From 1ada75442fd832ab81de3b2113993641be61e325 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 6 Nov 2023 13:36:35 +0100 Subject: [PATCH] extending to handle custom lateral cover --- blocks/timeline/build/block.json | 13 + blocks/timeline/build/index.asset.php | 2 +- blocks/timeline/build/index.css | 7 + blocks/timeline/build/index.css.map | 2 +- blocks/timeline/build/index.js | 370 +++++++++++++++++- blocks/timeline/build/index.js.map | 2 +- .../build/timeline-step/index.asset.php | 2 +- blocks/timeline/build/timeline-step/index.js | 2 - .../timeline/build/timeline-step/index.js.map | 2 +- .../build/timeline-step/style-index.css | 4 + blocks/timeline/src/block.json | 13 + blocks/timeline/src/edit.js | 151 ++++++- blocks/timeline/src/editor.scss | 9 +- blocks/timeline/src/save.js | 21 +- 14 files changed, 555 insertions(+), 45 deletions(-) create mode 100644 blocks/timeline/build/timeline-step/style-index.css diff --git a/blocks/timeline/build/block.json b/blocks/timeline/build/block.json index 6d17800..0a67269 100644 --- a/blocks/timeline/build/block.json +++ b/blocks/timeline/build/block.json @@ -14,6 +14,19 @@ "editorStyle": "file:./index.css", "style": "file:./style-index.css", "attributes": { + "hasLateralCover": { + "type": "boolean", + "default": false + }, + "lateralCoverId": { + "type": "number" + }, + "lateralCoverUrl": { + "type": "string" + }, + "lateralCoverAlt": { + "type": "string" + }, "hasStepPictures": { "type": "boolean", "default": true diff --git a/blocks/timeline/build/index.asset.php b/blocks/timeline/build/index.asset.php index 350b4f3..85961e9 100644 --- a/blocks/timeline/build/index.asset.php +++ b/blocks/timeline/build/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '922cac31980cffd4a81d'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '5e57ae73692f9d55e423'); diff --git a/blocks/timeline/build/index.css b/blocks/timeline/build/index.css index 7d42c60..3618760 100644 --- a/blocks/timeline/build/index.css +++ b/blocks/timeline/build/index.css @@ -4,6 +4,9 @@ .homegrade-blocks-timeline--has-step-icons:before { z-index: 0 !important; } +.homegrade-blocks-timeline .components-placeholder { + max-height: 300px; +} .homegrade-blocks-timeline .homegrade-blocks-timeline-step__icon .please-add-icon { text-align: center; color: #e04d42; @@ -14,6 +17,10 @@ margin-bottom: 30px; } +.homegrade-blocks-timeline__panel-body > img { + max-height: 150px; +} + .homegrade-blocks-timeline-step__panel-body .components-tip { margin: 10px 0; } diff --git a/blocks/timeline/build/index.css.map b/blocks/timeline/build/index.css.map index 6a2b64a..9e8ca99 100644 --- a/blocks/timeline/build/index.css.map +++ b/blocks/timeline/build/index.css.map @@ -1 +1 @@ -{"version":3,"file":"index.css","mappings":";;;AAEE;EACC;AADH;AAOG;EACC;EACA;EACA;EACA;AALJ;AAQE;EACC;AANH;;AAiBC;EACC;AAdF;AAiBE;EACC;AAfH;AAkBC;EACC;EACA;AAhBF;AAkBC;EACC;AAhBF;AAkBC;EACC;EACA;EAAA;AAhBF;AAkBC;EACC;EACA;EACA;EACA;AAhBF,C","sources":["webpack://multiblocks/./src/editor.scss"],"sourcesContent":[".homegrade-blocks-timeline {\r\n\t&--has-step-icons {\r\n\t\t&:before {\r\n\t\t\tz-index: 0 !important;\r\n\t\t}\r\n\t}\r\n\r\n\t.homegrade-blocks-timeline-step {\r\n\t\t&__icon {\r\n\t\t\t.please-add-icon {\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\tcolor: #e04d42;\r\n\t\t\t\tfont-weight: 600;\r\n\t\t\t\tmargin: auto;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.block-editor-media-placeholder {\r\n\t\t\tmargin-bottom: 30px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.homegrade-blocks-timeline__panel-body {\r\n\t// label {\r\n\t// \ttext-transform: uppercase;\r\n\t// }\r\n}\r\n.homegrade-blocks-timeline-step__panel-body {\r\n\t.components-tip {\r\n\t\tmargin: 10px 0;\r\n\t}\r\n\t&--icon {\r\n\t\timg {\r\n\t\t\tmax-height: 60px;\r\n\t\t}\r\n\t}\r\n\t.components-dropdown .components-toolbar__control {\r\n\t\tbackground-color: #e04d42;\r\n\t\tcolor: white;\r\n\t}\r\n\timg {\r\n\t\tdisplay: block;\r\n\t}\r\n\t.components-dropdown {\r\n\t\tdisplay: block;\r\n\t\twidth: fit-content;\r\n\t}\r\n\t.media-replace-container {\r\n\t\tpadding: 10px 0;\r\n\t\tdisplay: flex;\r\n\t\tgap: 10px;\r\n\t\talign-items: center;\r\n\t\t// margin-top: 10px;\r\n\t}\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.css","mappings":";;;AAEE;EACC;AADH;AAIC;EACC;AAFF;AAOG;EACC;EACA;EACA;EACA;AALJ;AAQE;EACC;AANH;;AAYC;EACC;AATF;;AAaC;EACC;AAVF;AAaE;EACC;AAXH;AAcC;EACC;EACA;AAZF;AAcC;EACC;AAZF;AAcC;EACC;EACA;EAAA;AAZF;AAcC;EACC;EACA;EACA;EACA;AAZF,C","sources":["webpack://multiblocks/./src/editor.scss"],"sourcesContent":[".homegrade-blocks-timeline {\r\n\t&--has-step-icons {\r\n\t\t&:before {\r\n\t\t\tz-index: 0 !important;\r\n\t\t}\r\n\t}\r\n\t.components-placeholder {\r\n\t\tmax-height: 300px;\r\n\t}\r\n\r\n\t.homegrade-blocks-timeline-step {\r\n\t\t&__icon {\r\n\t\t\t.please-add-icon {\r\n\t\t\t\ttext-align: center;\r\n\t\t\t\tcolor: #e04d42;\r\n\t\t\t\tfont-weight: 600;\r\n\t\t\t\tmargin: auto;\r\n\t\t\t}\r\n\t\t}\r\n\t\t.block-editor-media-placeholder {\r\n\t\t\tmargin-bottom: 30px;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.homegrade-blocks-timeline__panel-body {\r\n\t> img {\r\n\t\tmax-height: 150px;\r\n\t}\r\n}\r\n.homegrade-blocks-timeline-step__panel-body {\r\n\t.components-tip {\r\n\t\tmargin: 10px 0;\r\n\t}\r\n\t&--icon {\r\n\t\timg {\r\n\t\t\tmax-height: 60px;\r\n\t\t}\r\n\t}\r\n\t.components-dropdown .components-toolbar__control {\r\n\t\tbackground-color: #e04d42;\r\n\t\tcolor: white;\r\n\t}\r\n\timg {\r\n\t\tdisplay: block;\r\n\t}\r\n\t.components-dropdown {\r\n\t\tdisplay: block;\r\n\t\twidth: fit-content;\r\n\t}\r\n\t.media-replace-container {\r\n\t\tpadding: 10px 0;\r\n\t\tdisplay: flex;\r\n\t\tgap: 10px;\r\n\t\talign-items: center;\r\n\t\t// margin-top: 10px;\r\n\t}\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/timeline/build/index.js b/blocks/timeline/build/index.js index c257d59..4139658 100644 --- a/blocks/timeline/build/index.js +++ b/blocks/timeline/build/index.js @@ -2,6 +2,243 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ +/***/ "../_components/Image.jsx": +/*!********************************!*\ + !*** ../_components/Image.jsx ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Image) +/* 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__); + +function Image({ + imageUrl, + imageAlt, + imageProportion +}) { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: imageUrl, + alt: imageAlt, + className: `homegrade-blocks-components-image homegrade-blocks-components-image--${imageProportion}-ratio` + }); +} + +/***/ }), + +/***/ "../_components/ImageMediaPlaceholder.jsx": +/*!************************************************!*\ + !*** ../_components/ImageMediaPlaceholder.jsx ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ImageMediaPlaceholder) +/* 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 _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__); + + +function ImageMediaPlaceholder({ + imageId, + imageAlt, + imageUrl, + setAttributes +}) { + function setImageAttributes(image) { + setAttributes({ + imageId: image.id, + imageAlt: image.alt, + imageUrl: image.url + }); + } + function removeImageAttributes() { + setAttributes({ + imageId: null, + imageAlt: null, + imageUrl: null + }); + } + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !imageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.MediaPlaceholder, { + accept: "image/*", + allowedTypes: ["image"], + onSelect: setImageAttributes, + multiple: false, + handleUpload: true + })); +} + +/***/ }), + +/***/ "../_components/ImagePanelBody.jsx": +/*!*****************************************!*\ + !*** ../_components/ImagePanelBody.jsx ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ImagePanelBody) +/* 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 _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 _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/trash.js"); + + + + + +function ImagePanelBody({ + imageUrl, + imageAlt, + imageId, + imageProportion, + setAttributes +}) { + function setImageAttributes(image) { + setAttributes({ + imageId: image.id, + imageAlt: image.alt, + imageUrl: image.url + }); + } + function removeImageAttributes() { + setAttributes({ + imageId: null, + imageAlt: null, + imageUrl: null + }); + } + function onImageProportionChange(imageProportion) { + console.log(imageProportion); + setAttributes({ + imageProportion + }); + } + 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_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { + className: "homegrade-blocks-components-image__panel-body", + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Image", "homegrade-blocks__texte-backoffice") + }, imageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: imageUrl, + alt: imageAlt + }), (0,_wordpress_element__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, { + mediaId: imageId, + mediaUrl: imageUrl, + allowedTypes: ["image"], + accept: "image/*", + onSelect: setImageAttributes, + name: !imageUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice") + }), imageUrl && (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_components__WEBPACK_IMPORTED_MODULE_2__.Button, { + className: "custom-flow-button", + variant: "primary", + icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], + label: "Supprimer", + onClick: removeImageAttributes + }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tip, null, "Si besoin, Utilisez le champ \"L\xE9gende\"de la m\xE9diath\xE8que pour afficher un copyright"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Tip, null, "Si besoin, Utilisez le champ \"Description\" de la m\xE9diath\xE8que pour donner afficher une description de votre image"), imageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, { + label: "Proportion", + className: "homegrade-blocks-components-image__ratio-selector", + isBlock: true, + onChange: onImageProportionChange, + value: imageProportion + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { + variant: "primary", + label: "Original", + value: "original" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { + variant: "primary", + label: "Moyen", + value: "medium" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControlOption, { + variant: "primary", + label: "Carr\xE9", + value: "square" + })))); +} + +/***/ }), + +/***/ "../_components/ImagePanelBodyContent.jsx": +/*!************************************************!*\ + !*** ../_components/ImagePanelBodyContent.jsx ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ ImagePanelBody) +/* 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 _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 _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/trash.js"); + + + + + +function ImagePanelBody({ + imageUrl, + imageAlt, + imageId, + imageProportion, + setAttributes +}) { + function setImageAttributes(image) { + setAttributes({ + imageId: image.id, + imageAlt: image.alt, + imageUrl: image.url + }); + } + function removeImageAttributes() { + setAttributes({ + imageId: null, + imageAlt: null, + imageUrl: null + }); + } + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, imageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: imageUrl, + alt: imageAlt + }), (0,_wordpress_element__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, { + mediaId: imageId, + mediaUrl: imageUrl, + allowedTypes: ["image"], + accept: "image/*", + onSelect: setImageAttributes, + name: !imageUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice") + }), imageUrl && (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_components__WEBPACK_IMPORTED_MODULE_2__.Button, { + className: "custom-flow-button", + variant: "primary", + icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], + label: "Supprimer", + onClick: removeImageAttributes + })))); +} + +/***/ }), + /***/ "./src/edit.js": /*!*********************!*\ !*** ./src/edit.js ***! @@ -24,6 +261,14 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/@wordpress/icons/build-module/library/trash.js"); +/* harmony import */ var _components_ImageMediaPlaceholder__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../_components/ImageMediaPlaceholder */ "../_components/ImageMediaPlaceholder.jsx"); +/* harmony import */ var _components_Image__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../_components/Image */ "../_components/Image.jsx"); +/* harmony import */ var _components_ImagePanelBody__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../_components/ImagePanelBody */ "../_components/ImagePanelBody.jsx"); +/* harmony import */ var _components_ImagePanelBodyContent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../_components/ImagePanelBodyContent */ "../_components/ImagePanelBodyContent.jsx"); + + + @@ -42,7 +287,11 @@ function Edit({ let { hasStepPictures, stepPictureFormat, - hasStepIcons + hasStepIcons, + hasLateralCover, + lateralCoverId, + lateralCoverAlt, + lateralCoverUrl } = attributes; let children = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.useSelect)(select => select("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks); function handleStepPictureFormatChange(stepPictureFormat) { @@ -60,6 +309,36 @@ function Edit({ hasStepIcons: !hasStepIcons }); } + function onChangeImagesDispositionType(disposition) { + console.log(disposition); + if (disposition === "hasStepPictures") { + setAttributes({ + hasStepPictures: true, + hasLateralCover: false + }); + removeLateralCoverAttributes(); + } + if (disposition === "hasLateralCover") { + setAttributes({ + hasStepPictures: false, + hasLateralCover: true + }); + } + } + function setLateralCoverAttributes(cover) { + setAttributes({ + lateralCoverId: cover.id, + lateralCoverAlt: cover.alt, + lateralCoverUrl: cover.url + }); + } + function removeLateralCoverAttributes() { + setAttributes({ + lateralCoverId: null, + lateralCoverAlt: null, + lateralCoverUrl: null + }); + } function updateChildrensProps(children) { children.forEach(child => { (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_5__.dispatch)("core/block-editor").updateBlockAttributes(child.clientId, { @@ -73,22 +352,37 @@ function Edit({ updateChildrensProps(children); } }, [children, hasStepPictures, hasStepIcons]); + const TEMPLATE = [["homegrade-content-blocks/timeline-step", { + timelineStepTitle: "Etape 1", + timelineStepSubtitle: "sous titre" + }], ["homegrade-content-blocks/timeline-step", { + timelineStepTitle: "Etape 2", + timelineStepSubtitle: "sous titre" + }]]; 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_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Variantes de Timeline", "homegrade-blocks__texte-backoffice"), - className: "homegrade-blocks-timeline__panel-body" + className: "homegrade-blocks-timeline__panel-body homegrade-blocks-components-image__panel-body" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { htmlFor: "" }, "Icones"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.FormToggle, { label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Icones", "homegrade-blocks__texte-backoffice"), checked: hasStepIcons, onChange: onChangehasStepIcons - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { - htmlFor: "" - }, "Images"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.FormToggle, { - label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Icones", "homegrade-blocks__texte-backoffice"), - checked: hasStepPictures, - onChange: onChangehasStepPictures - })), hasStepPictures && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.RadioControl + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalToggleGroupControl, { + label: "Type d'image", + className: "homegrade-blocks-components-image__ratio-selector", + isBlock: true, + onChange: onChangeImagesDispositionType, + value: hasStepPictures ? "hasStepPictures" : "hasLateralCover" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalToggleGroupControlOption, { + variant: "hasStepPictures", + label: "Images par ligne", + value: "hasStepPictures" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalToggleGroupControlOption, { + variant: "lateralCover", + label: "Illustration lat\xE9arale", + value: "hasLateralCover" + }))), hasStepPictures && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.RadioControl // label={__("Tailles des images", "textdomain")} , { help: "Taille des images", @@ -104,12 +398,42 @@ function Edit({ value: "xl" }], onChange: handleStepPictureFormatChange - })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { + })), lateralCoverUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: lateralCoverUrl, + alt: lateralCoverAlt + }), hasLateralCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "media-replace-container" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaReplaceFlow, { + mediaId: lateralCoverId, + mediaUrl: lateralCoverUrl, + allowedTypes: ["image"], + accept: "image/*", + onSelect: setLateralCoverAttributes, + name: !lateralCoverUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice") + }), lateralCoverUrl && (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_components__WEBPACK_IMPORTED_MODULE_6__.Button, { + className: "custom-flow-button", + variant: "primary", + icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"], + label: "Supprimer", + onClick: removeLateralCoverAttributes + }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({ - className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""}` + className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""} + ${hasLateralCover ? "homegrade-blocks-timeline--has-lateral-cover" : ""}` }) - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, { - allowedBlocks: ["homegrade-content-blocks/timeline-step"] + }, hasLateralCover && !lateralCoverUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaPlaceholder, { + accept: "image/*", + allowedTypes: ["image"], + onSelect: setLateralCoverAttributes, + multiple: false, + handleUpload: true + }), hasLateralCover && lateralCoverUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + className: "homegrade-blocks-timeline__lateral-cover", + src: lateralCoverUrl, + alt: lateralCoverAlt + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, { + allowedBlocks: ["homegrade-content-blocks/timeline-step"], + template: TEMPLATE }))); } @@ -192,13 +516,23 @@ function save({ let { hasStepPictures, stepPictureFormat, - hasStepIcons + hasStepIcons, + hasLateralCover, + lateralCoverUrl, + lateralCoverAlt } = attributes; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({ - className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""}` + className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""} ${hasStepPictures ? "homegrade-blocks-timeline--has-step-pictures" : "homegrade-blocks-timeline--has-no-step-pictures"} + ${hasLateralCover ? "homegrade-blocks-timeline--has-lateral-cover" : ""}` }) - }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null)); + }, hasLateralCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + className: "homegrade-blocks-timeline__lateral-cover", + src: lateralCoverUrl, + alt: lateralCoverAlt + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "homegrade-blocks-timeline__innercontent" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null))); } /***/ }), @@ -231,7 +565,6 @@ __webpack_require__.r(__webpack_exports__); - function Edit({ attributes, setAttributes, @@ -262,7 +595,6 @@ function Edit({ }); } function setImageAttributes(media) { - console.log(media); if (!media || !media.url) { setAttributes({ timelineStepImageUrl: null, @@ -685,7 +1017,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/timeline","version":"0.1.0","title":"Timeline","category":"homegrade-blocks","description":"Pour la création de timeline","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"hasStepPictures":{"type":"boolean","default":true},"hasStepIcons":{"type":"boolean","default":true},"stepPictureFormat":{"type":"string","default":"md"}}}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline","version":"0.1.0","title":"Timeline","category":"homegrade-blocks","description":"Pour la création de timeline","supports":{"html":false},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"hasLateralCover":{"type":"boolean","default":false},"lateralCoverId":{"type":"number"},"lateralCoverUrl":{"type":"string"},"lateralCoverAlt":{"type":"string"},"hasStepPictures":{"type":"boolean","default":true},"hasStepIcons":{"type":"boolean","default":true},"stepPictureFormat":{"type":"string","default":"md"}}}'); /***/ }), diff --git a/blocks/timeline/build/index.js.map b/blocks/timeline/build/index.js.map index dce2f6d..f07a809 100644 --- a/blocks/timeline/build/index.js.map +++ b/blocks/timeline/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AACE;AAEsD;AACnB;AACb;AACO;AAOvB;AACU;AAE1B,SAASa,IAAIA,CAAC;EAAEC,UAAU;EAAEC,aAAa;EAAEC;AAAS,CAAC,EAAE;EACrE,IAAI;IAAEC,eAAe;IAAEC,iBAAiB;IAAEC;EAAa,CAAC,GAAGL,UA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D;;;;;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;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/timeline-step/edit.js","webpack://multiblocks/./src/timeline-step/index.js","webpack://multiblocks/./src/timeline-step/save.js","webpack://multiblocks/./src/editor.scss?0339","webpack://multiblocks/./src/style.scss","webpack://multiblocks/./src/timeline-step/editor.scss","webpack://multiblocks/./src/timeline-step/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\",\"data\"]","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 \"./timeline-step\";\n\nimport { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\nimport { InspectorControls } from \"@wordpress/block-editor\";\nimport { useEffect } from \"@wordpress/element\";\nimport { useSelect, dispatch } from \"@wordpress/data\";\n\nimport {\n\tPanelBody,\n\tPanelRow,\n\tRadioControl,\n\tFormToggle,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({ attributes, setAttributes, clientId }) {\n\tlet { hasStepPictures, stepPictureFormat, hasStepIcons } = attributes;\n\n\tlet children = useSelect(\n\t\t(select) =>\n\t\t\tselect(\"core/block-editor\").getBlocksByClientId(clientId)[0].innerBlocks\n\t);\n\n\tfunction handleStepPictureFormatChange(stepPictureFormat) {\n\t\tsetAttributes({ stepPictureFormat });\n\t}\n\tfunction onChangehasStepPictures() {\n\t\tsetAttributes({ hasStepPictures: !hasStepPictures });\n\t}\n\tfunction onChangehasStepIcons() {\n\t\tsetAttributes({ hasStepIcons: !hasStepIcons });\n\t}\n\n\tfunction updateChildrensProps(children) {\n\t\tchildren.forEach((child) => {\n\t\t\tdispatch(\"core/block-editor\").updateBlockAttributes(child.clientId, {\n\t\t\t\thasStepIcon: hasStepIcons,\n\t\t\t\thasStepPicture: hasStepPictures,\n\t\t\t});\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (children && children.length > 0) {\n\t\t\tupdateChildrensProps(children);\n\t\t}\n\t}, [children, hasStepPictures, hasStepIcons]);\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\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\n\t\t\t\t\t\n\t\t\t\t\t{hasStepPictures && (\n\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\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\t130all\n\t\t\t\t\n\t\t\t\t\n\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, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tlet { hasStepPictures, stepPictureFormat, hasStepIcons } = attributes;\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\n\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInnerBlocks,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToolbarGroup,\n\tToolbarButton,\n\tButton,\n} from \"@wordpress/components\";\nimport { useEffect } from \"@wordpress/element\";\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\nimport { trash } from \"@wordpress/icons\";\nimport { Tip } from \"@wordpress/components\";\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tlet {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageId,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconId,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\n\tfunction onChangeTimelineStepTitle(timelineStepTitle) {\n\t\tsetAttributes({ timelineStepTitle });\n\t}\n\tfunction onChangeTimelineDescription(timelineStepSubtitle) {\n\t\tsetAttributes({ timelineStepSubtitle });\n\t}\n\tfunction setImageAttributes(media) {\n\t\tconsole.log(media);\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepImageUrl: null,\n\t\t\t\ttimelineStepImageId: null,\n\t\t\t\ttimelineStepImageAlt: null,\n\t\t\t\ttimelineStepImageCaption: null,\n\t\t\t\ttimelineStepImageDescription: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: media.url,\n\t\t\ttimelineStepImageId: media.id,\n\t\t\ttimelineStepImageAlt: media?.alt,\n\t\t\ttimelineStepImageCaption: media?.caption,\n\t\t\ttimelineStepImageDescription: media?.description,\n\t\t});\n\t}\n\tfunction removeImageAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: null,\n\t\t\ttimelineStepImageId: null,\n\t\t\ttimelineStepImageAlt: null,\n\t\t});\n\t}\n\n\tfunction setIconAttributes(media) {\n\t\tconsole.log(media);\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepIconUrl: null,\n\t\t\t\ttimelineStepIconId: null,\n\t\t\t\ttimelineStepIconAlt: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: media.url,\n\t\t\ttimelineStepIconId: media.id,\n\t\t\ttimelineStepIconAlt: media?.alt,\n\t\t});\n\t}\n\n\tfunction removeIconAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: null,\n\t\t\ttimelineStepIconId: null,\n\t\t\ttimelineStepIconAlt: null,\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (hasStepPicture === false) {\n\t\t\tsetImageAttributes(null);\n\t\t}\n\t}, [hasStepPicture]);\n\tuseEffect(() => {\n\t\tif (hasStepIcon === false) {\n\t\t\tsetIconAttributes(null);\n\t\t}\n\t}, [hasStepIcon]);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t\t<>\n\t\t\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\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Légende\"de la médiathèque pour\n\t\t\t\t\t\t\tafficher un copyright\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Description\" de la médiathèque pour\n\t\t\t\t\t\t\tdonner afficher une description de votre image\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\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\t\n\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\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{!timelineStepImageUrl && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageCaption &&

{timelineStepImageCaption}

}\n\t\t\t\t\t
\n\t\t\t\t)}\n\n\t\t\t\t
\n\t\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{!timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t

Ajoutez une icone !

\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\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\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\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nimport { navigation } from \"@wordpress/icons\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: {\n\t\tforeground: \"#DF1E1E\",\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},\n\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\treturn (\n\t\t\n\t\t\t{hasStepPicture && (\n\t\t\t\t
\n\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t)}\n\t\t\t\t\t{(timelineStepImageDescription || timelineStepImageCaption) && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{timelineStepImageCaption && (\n\t\t\t\t\t\t\t\t

{timelineStepImageCaption}

\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\t
\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\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\n\t\t\t\t\t\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 {};","// 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\"][\"data\"];","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","RichText","InnerBlocks","InspectorControls","useEffect","useSelect","dispatch","PanelBody","PanelRow","RadioControl","FormToggle","trash","Edit","attributes","setAttributes","clientId","hasStepPictures","stepPictureFormat","hasStepIcons","children","select","getBlocksByClientId","innerBlocks","handleStepPictureFormatChange","onChangehasStepPictures","onChangehasStepIcons","updateChildrensProps","forEach","child","updateBlockAttributes","hasStepIcon","hasStepPicture","length","createElement","Fragment","title","className","htmlFor","label","checked","onChange","help","selected","options","value","allowedBlocks","registerBlockType","save","metadata","name","icon","src","xmlns","viewBox","x","y","d","width","height","foreground","edit","Content","BlockControls","ToolbarGroup","ToolbarButton","Button","MediaReplaceFlow","MediaPlaceholder","Tip","props","timelineStepTitle","timelineStepSubtitle","timelineStepImageUrl","timelineStepImageId","timelineStepImageAlt","timelineStepImageCaption","timelineStepImageDescription","timelineStepIconUrl","timelineStepIconId","timelineStepIconAlt","onChangeTimelineStepTitle","onChangeTimelineDescription","setImageAttributes","media","console","log","url","id","alt","caption","description","removeImageAttributes","setIconAttributes","removeIconAttributes","mediaId","mediaUrl","allowedTypes","accept","onSelect","variant","onClick","isActive","multiple","handleUpload","tagName","placeholder","Save","navigation","version","supports"],"sourceRoot":""} \ No newline at end of file +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AAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEnDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/../_components/Image.jsx","webpack://multiblocks/../_components/ImageMediaPlaceholder.jsx","webpack://multiblocks/../_components/ImagePanelBody.jsx","webpack://multiblocks/../_components/ImagePanelBodyContent.jsx","webpack://multiblocks/./src/edit.js","webpack://multiblocks/./src/index.js","webpack://multiblocks/./src/save.js","webpack://multiblocks/./src/timeline-step/edit.js","webpack://multiblocks/./src/timeline-step/index.js","webpack://multiblocks/./src/timeline-step/save.js","webpack://multiblocks/./src/editor.scss","webpack://multiblocks/./src/style.scss","webpack://multiblocks/./src/timeline-step/editor.scss","webpack://multiblocks/./src/timeline-step/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\",\"data\"]","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":["export default function Image({ imageUrl, imageAlt, imageProportion }) {\r\n\treturn (\r\n\t\t\r\n\t);\r\n}\r\n","import { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\r\n\r\nexport default function ImageMediaPlaceholder({ imageId, imageAlt, imageUrl, setAttributes }) {\r\n\tfunction setImageAttributes(image) {\r\n\t\tsetAttributes({\r\n\t\t\timageId: image.id,\r\n\t\t\timageAlt: image.alt,\r\n\t\t\timageUrl: image.url,\r\n\t\t});\r\n\t}\r\n\r\n\tfunction removeImageAttributes() {\r\n\t\tsetAttributes({\r\n\t\t\timageId: null,\r\n\t\t\timageAlt: null,\r\n\t\t\timageUrl: null,\r\n\t\t});\r\n\t}\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{!imageUrl && (\r\n\t\t\t\t\r\n\t\t\t)}\r\n\t\t\r\n\t);\r\n}\r\n","import { __ } from \"@wordpress/i18n\";\r\nimport {\r\n\tPanelBody,\r\n\tButton,\r\n\tTip,\r\n\t__experimentalToggleGroupControl as ToggleGroupControl,\r\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\r\n} from \"@wordpress/components\";\r\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\r\nimport { trash } from \"@wordpress/icons\";\r\n\r\nexport default function ImagePanelBody({ imageUrl, imageAlt, imageId, imageProportion, setAttributes }) {\r\n\tfunction setImageAttributes(image) {\r\n\t\tsetAttributes({\r\n\t\t\timageId: image.id,\r\n\t\t\timageAlt: image.alt,\r\n\t\t\timageUrl: image.url,\r\n\t\t});\r\n\t}\r\n\r\n\tfunction removeImageAttributes() {\r\n\t\tsetAttributes({\r\n\t\t\timageId: null,\r\n\t\t\timageAlt: null,\r\n\t\t\timageUrl: null,\r\n\t\t});\r\n\t}\r\n\tfunction onImageProportionChange(imageProportion) {\r\n\t\tconsole.log(imageProportion);\r\n\t\tsetAttributes({ imageProportion });\r\n\t}\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{imageUrl && {imageAlt}}\r\n\t\t\t\t
\r\n\t\t\t\t\t\r\n\t\t\t\t\t{imageUrl && (\r\n\t\t\t\t\t\t<>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t)}\r\n\t\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\tSi besoin, Utilisez le champ \"Légende\"de la médiathèque pour afficher un\r\n\t\t\t\t\tcopyright\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\tSi besoin, Utilisez le champ \"Description\" de la médiathèque pour donner\r\n\t\t\t\t\tafficher une description de votre image\r\n\t\t\t\t\r\n\t\t\t\t{imageUrl && (\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","import { __ } from \"@wordpress/i18n\";\r\nimport {\r\n\tPanelBody,\r\n\tButton,\r\n\tTip,\r\n\t__experimentalToggleGroupControl as ToggleGroupControl,\r\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\r\n} from \"@wordpress/components\";\r\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\r\nimport { trash } from \"@wordpress/icons\";\r\n\r\nexport default function ImagePanelBody({ imageUrl, imageAlt, imageId, imageProportion, setAttributes }) {\r\n\tfunction setImageAttributes(image) {\r\n\t\tsetAttributes({\r\n\t\t\timageId: image.id,\r\n\t\t\timageAlt: image.alt,\r\n\t\t\timageUrl: image.url,\r\n\t\t});\r\n\t}\r\n\r\n\tfunction removeImageAttributes() {\r\n\t\tsetAttributes({\r\n\t\t\timageId: null,\r\n\t\t\timageAlt: null,\r\n\t\t\timageUrl: null,\r\n\t\t});\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t{imageUrl && {imageAlt}}\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t{imageUrl && (\r\n\t\t\t\t\t<>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\t\t\t
\r\n\t\t\r\n\t);\r\n}\r\n","import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport \"./timeline-step\";\n\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInnerBlocks,\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\n\nimport { useEffect } from \"@wordpress/element\";\nimport { useSelect, dispatch } from \"@wordpress/data\";\nimport {\n\tPanelBody,\n\tPanelRow,\n\tButton,\n\tRadioControl,\n\tFormToggle,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\nimport ImageMediaPlaceholder from \"../../_components/ImageMediaPlaceholder\";\nimport Image from \"../../_components/Image\";\nimport ImagePanelBody from \"../../_components/ImagePanelBody\";\nimport ImagePanelBodyContent from \"../../_components/ImagePanelBodyContent\";\nexport default function Edit({ attributes, setAttributes, clientId }) {\n\tlet {\n\t\thasStepPictures,\n\t\tstepPictureFormat,\n\t\thasStepIcons,\n\t\thasLateralCover,\n\t\tlateralCoverId,\n\t\tlateralCoverAlt,\n\t\tlateralCoverUrl,\n\t} = attributes;\n\n\tlet children = useSelect(\n\t\t(select) =>\n\t\t\tselect(\"core/block-editor\").getBlocksByClientId(clientId)[0].innerBlocks\n\t);\n\n\tfunction handleStepPictureFormatChange(stepPictureFormat) {\n\t\tsetAttributes({ stepPictureFormat });\n\t}\n\tfunction onChangehasStepPictures() {\n\t\tsetAttributes({ hasStepPictures: !hasStepPictures });\n\t}\n\tfunction onChangehasStepIcons() {\n\t\tsetAttributes({ hasStepIcons: !hasStepIcons });\n\t}\n\tfunction onChangeImagesDispositionType(disposition) {\n\t\tconsole.log(disposition);\n\t\tif (disposition === \"hasStepPictures\") {\n\t\t\tsetAttributes({ hasStepPictures: true, hasLateralCover: false });\n\t\t\tremoveLateralCoverAttributes();\n\t\t}\n\t\tif (disposition === \"hasLateralCover\") {\n\t\t\tsetAttributes({ hasStepPictures: false, hasLateralCover: true });\n\t\t}\n\t}\n\tfunction setLateralCoverAttributes(cover) {\n\t\tsetAttributes({\n\t\t\tlateralCoverId: cover.id,\n\t\t\tlateralCoverAlt: cover.alt,\n\t\t\tlateralCoverUrl: cover.url,\n\t\t});\n\t}\n\tfunction removeLateralCoverAttributes() {\n\t\tsetAttributes({\n\t\t\tlateralCoverId: null,\n\t\t\tlateralCoverAlt: null,\n\t\t\tlateralCoverUrl: null,\n\t\t});\n\t}\n\n\tfunction updateChildrensProps(children) {\n\t\tchildren.forEach((child) => {\n\t\t\tdispatch(\"core/block-editor\").updateBlockAttributes(child.clientId, {\n\t\t\t\thasStepIcon: hasStepIcons,\n\t\t\t\thasStepPicture: hasStepPictures,\n\t\t\t});\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (children && children.length > 0) {\n\t\t\tupdateChildrensProps(children);\n\t\t}\n\t}, [children, hasStepPictures, hasStepIcons]);\n\n\tconst TEMPLATE = [\n\t\t[\n\t\t\t\"homegrade-content-blocks/timeline-step\",\n\t\t\t{\n\t\t\t\ttimelineStepTitle: \"Etape 1\",\n\t\t\t\ttimelineStepSubtitle: \"sous titre\",\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"homegrade-content-blocks/timeline-step\",\n\t\t\t{\n\t\t\t\ttimelineStepTitle: \"Etape 2\",\n\t\t\t\ttimelineStepSubtitle: \"sous titre\",\n\t\t\t},\n\t\t],\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\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\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{hasStepPictures && (\n\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{lateralCoverUrl && (\n\t\t\t\t\t\t{lateralCoverAlt}\n\t\t\t\t\t)}\n\n\t\t\t\t\t{hasLateralCover && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{lateralCoverUrl && (\n\t\t\t\t\t\t\t\t<>\n\t\t\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\n\t\t\t
\n\t\t\t\n\t\t\t\t{hasLateralCover && !lateralCoverUrl && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasLateralCover && lateralCoverUrl && (\n\t\t\t\t\t\n\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\t130all\n\t\t\t\t\n\t\t\t\t\n\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, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tlet {\n\t\thasStepPictures,\n\t\tstepPictureFormat,\n\t\thasStepIcons,\n\t\thasLateralCover,\n\t\tlateralCoverUrl,\n\t\tlateralCoverAlt,\n\t} = attributes;\n\n\treturn (\n\t\t\n\t\t\t{hasLateralCover && {lateralCoverAlt}}\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\n\t);\n}\n","import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\n\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInnerBlocks,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToolbarGroup,\n\tToolbarButton,\n\tButton,\n\tTip,\n} from \"@wordpress/components\";\nimport { useEffect } from \"@wordpress/element\";\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\nimport { trash } from \"@wordpress/icons\";\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tlet {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageId,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconId,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\n\tfunction onChangeTimelineStepTitle(timelineStepTitle) {\n\t\tsetAttributes({ timelineStepTitle });\n\t}\n\tfunction onChangeTimelineDescription(timelineStepSubtitle) {\n\t\tsetAttributes({ timelineStepSubtitle });\n\t}\n\tfunction setImageAttributes(media) {\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepImageUrl: null,\n\t\t\t\ttimelineStepImageId: null,\n\t\t\t\ttimelineStepImageAlt: null,\n\t\t\t\ttimelineStepImageCaption: null,\n\t\t\t\ttimelineStepImageDescription: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: media.url,\n\t\t\ttimelineStepImageId: media.id,\n\t\t\ttimelineStepImageAlt: media?.alt,\n\t\t\ttimelineStepImageCaption: media?.caption,\n\t\t\ttimelineStepImageDescription: media?.description,\n\t\t});\n\t}\n\tfunction removeImageAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: null,\n\t\t\ttimelineStepImageId: null,\n\t\t\ttimelineStepImageAlt: null,\n\t\t});\n\t}\n\n\tfunction setIconAttributes(media) {\n\t\tconsole.log(media);\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepIconUrl: null,\n\t\t\t\ttimelineStepIconId: null,\n\t\t\t\ttimelineStepIconAlt: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: media.url,\n\t\t\ttimelineStepIconId: media.id,\n\t\t\ttimelineStepIconAlt: media?.alt,\n\t\t});\n\t}\n\n\tfunction removeIconAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: null,\n\t\t\ttimelineStepIconId: null,\n\t\t\ttimelineStepIconAlt: null,\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (hasStepPicture === false) {\n\t\t\tsetImageAttributes(null);\n\t\t}\n\t}, [hasStepPicture]);\n\tuseEffect(() => {\n\t\tif (hasStepIcon === false) {\n\t\t\tsetIconAttributes(null);\n\t\t}\n\t}, [hasStepIcon]);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t\t<>\n\t\t\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\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Légende\"de la médiathèque pour\n\t\t\t\t\t\t\tafficher un copyright\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Description\" de la médiathèque pour\n\t\t\t\t\t\t\tdonner afficher une description de votre image\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\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\t\n\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\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{!timelineStepImageUrl && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageCaption &&

{timelineStepImageCaption}

}\n\t\t\t\t\t
\n\t\t\t\t)}\n\n\t\t\t\t
\n\t\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{!timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t

Ajoutez une icone !

\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\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\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\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nimport { navigation } from \"@wordpress/icons\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: {\n\t\tforeground: \"#DF1E1E\",\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},\n\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\treturn (\n\t\t\n\t\t\t{hasStepPicture && (\n\t\t\t\t
\n\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t)}\n\t\t\t\t\t{(timelineStepImageDescription || timelineStepImageCaption) && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{timelineStepImageCaption && (\n\t\t\t\t\t\t\t\t

{timelineStepImageCaption}

\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\t
\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\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\n\t\t\t\t\t\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 {};","// 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\"][\"data\"];","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":["Image","imageUrl","imageAlt","imageProportion","createElement","src","alt","className","MediaReplaceFlow","MediaPlaceholder","ImageMediaPlaceholder","imageId","setAttributes","setImageAttributes","image","id","url","removeImageAttributes","Fragment","accept","allowedTypes","onSelect","multiple","handleUpload","__","PanelBody","Button","Tip","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","trash","ImagePanelBody","onImageProportionChange","console","log","title","mediaId","mediaUrl","name","variant","icon","label","onClick","isBlock","onChange","value","useBlockProps","RichText","InnerBlocks","InspectorControls","useEffect","useSelect","dispatch","PanelRow","RadioControl","FormToggle","ImagePanelBodyContent","Edit","attributes","clientId","hasStepPictures","stepPictureFormat","hasStepIcons","hasLateralCover","lateralCoverId","lateralCoverAlt","lateralCoverUrl","children","select","getBlocksByClientId","innerBlocks","handleStepPictureFormatChange","onChangehasStepPictures","onChangehasStepIcons","onChangeImagesDispositionType","disposition","removeLateralCoverAttributes","setLateralCoverAttributes","cover","updateChildrensProps","forEach","child","updateBlockAttributes","hasStepIcon","hasStepPicture","length","TEMPLATE","timelineStepTitle","timelineStepSubtitle","htmlFor","checked","help","selected","options","allowedBlocks","template","registerBlockType","save","metadata","xmlns","viewBox","x","y","d","width","height","foreground","edit","Content","BlockControls","ToolbarGroup","ToolbarButton","props","timelineStepImageUrl","timelineStepImageId","timelineStepImageAlt","timelineStepImageCaption","timelineStepImageDescription","timelineStepIconUrl","timelineStepIconId","timelineStepIconAlt","onChangeTimelineStepTitle","onChangeTimelineDescription","media","caption","description","setIconAttributes","removeIconAttributes","isActive","tagName","placeholder","Save","navigation","version","supports"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/timeline/build/timeline-step/index.asset.php b/blocks/timeline/build/timeline-step/index.asset.php index dd25ffc..29ca5b2 100644 --- a/blocks/timeline/build/timeline-step/index.asset.php +++ b/blocks/timeline/build/timeline-step/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'fa5ad644fd69b39b24ce'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'eadc7a323c425e55d522'); diff --git a/blocks/timeline/build/timeline-step/index.js b/blocks/timeline/build/timeline-step/index.js index 7cb403f..a7f9ffb 100644 --- a/blocks/timeline/build/timeline-step/index.js +++ b/blocks/timeline/build/timeline-step/index.js @@ -30,7 +30,6 @@ __webpack_require__.r(__webpack_exports__); - function Edit({ attributes, setAttributes, @@ -61,7 +60,6 @@ function Edit({ }); } function setImageAttributes(media) { - console.log(media); if (!media || !media.url) { setAttributes({ timelineStepImageUrl: null, diff --git a/blocks/timeline/build/timeline-step/index.js.map b/blocks/timeline/build/timeline-step/index.js.map index c711b7f..7f28dc0 100644 --- a/blocks/timeline/build/timeline-step/index.js.map +++ b/blocks/timeline/build/timeline-step/index.js.map @@ -1 +1 @@ -{"version":3,"file":"timeline-step/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AAQU;AAMF;AACgB;AAC8B;AACpC;AACG;AAC7B,SAASe,IAAIA,CAAC;EAAEC,UAAU;EAAEC,aAAa;EAAE,GAAGC;AAAM,CAAC,EAAE;EACrE,IAAI;IACHC,iBAAiB;IACjBC,oBAAoB;IACpBC,oBAAoB;IACpBC,mBAAmB;IACnBC,oBAAoB;IACpBC,wBAAwB;IACxBC,4BAA4B;IAC5BC,mBAAmB;IACnBC,kBAAkB;IAClBC,mBAAmB;IACnBC,cAAc;IACdC;EACD,CAAC,GAAGd,UAAU;EAEd,SAASe,yBAAyBA,CAACZ,iBAAiB,EAAE;IACrDF,aAAa,CAAC;MAAEE;IAAkB,CAAC,CAAC;EACrC;EACA,SAASa,2BAA2BA,CAACZ,oBAAoB,EAAE;IAC1DH,aAAa,CAAC;MAAEG;IAAqB,CAAC,CAAC;EACxC;EACA,SAASa,kBAAkBA,CAACC,KAAK,EAAE;IAClCC,OAAO,CAACC,GAAG,CAACF,KAAK,CAAC;IAClB,IAAI,CAACA,KAAK,IAAI,CAACA,KAAK,CAACG,GAAG,EAAE;MACzBpB,aAAa,CAAC;QACbI,oBAAoB,EAAE,IAAI;QAC1BC,mBAAmB,EAAE,IAAI;QACzBC,oBAAoB,EA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;;;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;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;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;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEnDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/./src/timeline-step/edit.js","webpack://multiblocks/./src/timeline-step/index.js","webpack://multiblocks/./src/timeline-step/save.js","webpack://multiblocks/./src/timeline-step/editor.scss","webpack://multiblocks/./src/timeline-step/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\";\n\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInnerBlocks,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToolbarGroup,\n\tToolbarButton,\n\tButton,\n} from \"@wordpress/components\";\nimport { useEffect } from \"@wordpress/element\";\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\nimport { trash } from \"@wordpress/icons\";\nimport { Tip } from \"@wordpress/components\";\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tlet {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageId,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconId,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\n\tfunction onChangeTimelineStepTitle(timelineStepTitle) {\n\t\tsetAttributes({ timelineStepTitle });\n\t}\n\tfunction onChangeTimelineDescription(timelineStepSubtitle) {\n\t\tsetAttributes({ timelineStepSubtitle });\n\t}\n\tfunction setImageAttributes(media) {\n\t\tconsole.log(media);\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepImageUrl: null,\n\t\t\t\ttimelineStepImageId: null,\n\t\t\t\ttimelineStepImageAlt: null,\n\t\t\t\ttimelineStepImageCaption: null,\n\t\t\t\ttimelineStepImageDescription: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: media.url,\n\t\t\ttimelineStepImageId: media.id,\n\t\t\ttimelineStepImageAlt: media?.alt,\n\t\t\ttimelineStepImageCaption: media?.caption,\n\t\t\ttimelineStepImageDescription: media?.description,\n\t\t});\n\t}\n\tfunction removeImageAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: null,\n\t\t\ttimelineStepImageId: null,\n\t\t\ttimelineStepImageAlt: null,\n\t\t});\n\t}\n\n\tfunction setIconAttributes(media) {\n\t\tconsole.log(media);\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepIconUrl: null,\n\t\t\t\ttimelineStepIconId: null,\n\t\t\t\ttimelineStepIconAlt: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: media.url,\n\t\t\ttimelineStepIconId: media.id,\n\t\t\ttimelineStepIconAlt: media?.alt,\n\t\t});\n\t}\n\n\tfunction removeIconAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: null,\n\t\t\ttimelineStepIconId: null,\n\t\t\ttimelineStepIconAlt: null,\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (hasStepPicture === false) {\n\t\t\tsetImageAttributes(null);\n\t\t}\n\t}, [hasStepPicture]);\n\tuseEffect(() => {\n\t\tif (hasStepIcon === false) {\n\t\t\tsetIconAttributes(null);\n\t\t}\n\t}, [hasStepIcon]);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t\t<>\n\t\t\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\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Légende\"de la médiathèque pour\n\t\t\t\t\t\t\tafficher un copyright\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Description\" de la médiathèque pour\n\t\t\t\t\t\t\tdonner afficher une description de votre image\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\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\t\n\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\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{!timelineStepImageUrl && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageCaption &&

{timelineStepImageCaption}

}\n\t\t\t\t\t
\n\t\t\t\t)}\n\n\t\t\t\t
\n\t\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{!timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t

Ajoutez une icone !

\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\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\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\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nimport { navigation } from \"@wordpress/icons\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: {\n\t\tforeground: \"#DF1E1E\",\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},\n\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\treturn (\n\t\t\n\t\t\t{hasStepPicture && (\n\t\t\t\t
\n\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t)}\n\t\t\t\t\t{(timelineStepImageDescription || timelineStepImageCaption) && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{timelineStepImageCaption && (\n\t\t\t\t\t\t\t\t

{timelineStepImageCaption}

\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\t
\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\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\n\t\t\t\t\t\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[\"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\"timeline-step/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/timeline-step/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InnerBlocks","BlockControls","InspectorControls","PanelBody","ToolbarGroup","ToolbarButton","Button","useEffect","MediaReplaceFlow","MediaPlaceholder","trash","Tip","Edit","attributes","setAttributes","props","timelineStepTitle","timelineStepSubtitle","timelineStepImageUrl","timelineStepImageId","timelineStepImageAlt","timelineStepImageCaption","timelineStepImageDescription","timelineStepIconUrl","timelineStepIconId","timelineStepIconAlt","hasStepPicture","hasStepIcon","onChangeTimelineStepTitle","onChangeTimelineDescription","setImageAttributes","media","console","log","url","id","alt","caption","description","removeImageAttributes","setIconAttributes","removeIconAttributes","createElement","Fragment","className","title","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","label","onClick","isActive","multiple","handleUpload","tagName","placeholder","value","onChange","allowedBlocks","registerBlockType","metadata","Save","navigation","foreground","version","x","y","viewBox","d","supports","edit","save","Content"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"timeline-step/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AAQU;AAOF;AACgB;AAC8B;AACpC;AAC1B,SAASe,IAAIA,CAAC;EAAEC,UAAU;EAAEC,aAAa;EAAE,GAAGC;AAAM,CAAC,EAAE;EACrE,IAAI;IACHC,iBAAiB;IACjBC,oBAAoB;IACpBC,oBAAoB;IACpBC,mBAAmB;IACnBC,oBAAoB;IACpBC,wBAAwB;IACxBC,4BAA4B;IAC5BC,mBAAmB;IACnBC,kBAA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,SAAS,EAAC,0CAA0C;IACpDkB,KAAK,EAAE7C;EAAqB,CAC5B,CAAC,EACFyB,iEAAA,CAAC1C,gEAAW,CAAC8E,OAAO,MAAE,CAClB,CACD,CACD,CAAC;AAER;;;;;;;;;;;AC9DA;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;ACAmD;;AAEnD;AACA;AACA;AACkD;AAClD,cAAc,iEAAa,CAAC,sDAAG;AAC/B;AACA;AACA,CAAC,EAAE,iEAAa,CAAC,uDAAI;AACrB;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB;;;;;;;;;;ACbA;;;;;;;;;;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;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;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;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEnDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/./src/timeline-step/edit.js","webpack://multiblocks/./src/timeline-step/index.js","webpack://multiblocks/./src/timeline-step/save.js","webpack://multiblocks/./src/timeline-step/editor.scss","webpack://multiblocks/./src/timeline-step/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\";\n\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInnerBlocks,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToolbarGroup,\n\tToolbarButton,\n\tButton,\n\tTip,\n} from \"@wordpress/components\";\nimport { useEffect } from \"@wordpress/element\";\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\nimport { trash } from \"@wordpress/icons\";\nexport default function Edit({ attributes, setAttributes, ...props }) {\n\tlet {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageId,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconId,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\n\tfunction onChangeTimelineStepTitle(timelineStepTitle) {\n\t\tsetAttributes({ timelineStepTitle });\n\t}\n\tfunction onChangeTimelineDescription(timelineStepSubtitle) {\n\t\tsetAttributes({ timelineStepSubtitle });\n\t}\n\tfunction setImageAttributes(media) {\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepImageUrl: null,\n\t\t\t\ttimelineStepImageId: null,\n\t\t\t\ttimelineStepImageAlt: null,\n\t\t\t\ttimelineStepImageCaption: null,\n\t\t\t\ttimelineStepImageDescription: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: media.url,\n\t\t\ttimelineStepImageId: media.id,\n\t\t\ttimelineStepImageAlt: media?.alt,\n\t\t\ttimelineStepImageCaption: media?.caption,\n\t\t\ttimelineStepImageDescription: media?.description,\n\t\t});\n\t}\n\tfunction removeImageAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepImageUrl: null,\n\t\t\ttimelineStepImageId: null,\n\t\t\ttimelineStepImageAlt: null,\n\t\t});\n\t}\n\n\tfunction setIconAttributes(media) {\n\t\tconsole.log(media);\n\t\tif (!media || !media.url) {\n\t\t\tsetAttributes({\n\t\t\t\ttimelineStepIconUrl: null,\n\t\t\t\ttimelineStepIconId: null,\n\t\t\t\ttimelineStepIconAlt: null,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: media.url,\n\t\t\ttimelineStepIconId: media.id,\n\t\t\ttimelineStepIconAlt: media?.alt,\n\t\t});\n\t}\n\n\tfunction removeIconAttributes() {\n\t\tsetAttributes({\n\t\t\ttimelineStepIconUrl: null,\n\t\t\ttimelineStepIconId: null,\n\t\t\ttimelineStepIconAlt: null,\n\t\t});\n\t}\n\n\tuseEffect(() => {\n\t\tif (hasStepPicture === false) {\n\t\t\tsetImageAttributes(null);\n\t\t}\n\t}, [hasStepPicture]);\n\tuseEffect(() => {\n\t\tif (hasStepIcon === false) {\n\t\t\tsetIconAttributes(null);\n\t\t}\n\t}, [hasStepIcon]);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t\t<>\n\t\t\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\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Légende\"de la médiathèque pour\n\t\t\t\t\t\t\tafficher un copyright\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tSi besoin, Utilisez le champ \"Description\" de la médiathèque pour\n\t\t\t\t\t\t\tdonner afficher une description de votre image\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\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\t\n\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\n\t\t\t\n\t\t\t\t{hasStepPicture && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{!timelineStepImageUrl && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{timelineStepImageCaption &&

{timelineStepImageCaption}

}\n\t\t\t\t\t
\n\t\t\t\t)}\n\n\t\t\t\t
\n\t\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{!timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t

Ajoutez une icone !

\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t
\n\t\t\t\t\t)}\n\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\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\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nimport { navigation } from \"@wordpress/icons\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: {\n\t\tforeground: \"#DF1E1E\",\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},\n\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst {\n\t\ttimelineStepTitle,\n\t\ttimelineStepSubtitle,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageAlt,\n\t\ttimelineStepImageCaption,\n\t\ttimelineStepImageDescription,\n\t\ttimelineStepIconUrl,\n\t\ttimelineStepIconAlt,\n\t\thasStepPicture,\n\t\thasStepIcon,\n\t} = attributes;\n\treturn (\n\t\t\n\t\t\t{hasStepPicture && (\n\t\t\t\t
\n\t\t\t\t\t{timelineStepImageUrl && (\n\t\t\t\t\t\t{timelineStepImageAlt}\n\t\t\t\t\t)}\n\t\t\t\t\t{(timelineStepImageDescription || timelineStepImageCaption) && (\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{timelineStepImageDescription && (\n\t\t\t\t\t\t\t\t

{timelineStepImageDescription}

\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{timelineStepImageCaption && (\n\t\t\t\t\t\t\t\t

{timelineStepImageCaption}

\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\t
\n\t\t\t\t{hasStepIcon && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{timelineStepIconUrl && (\n\t\t\t\t\t\t\t{timelineStepIconAlt}\n\t\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\n\t\t\t\t\t\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[\"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\"timeline-step/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/timeline-step/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InnerBlocks","BlockControls","InspectorControls","PanelBody","ToolbarGroup","ToolbarButton","Button","Tip","useEffect","MediaReplaceFlow","MediaPlaceholder","trash","Edit","attributes","setAttributes","props","timelineStepTitle","timelineStepSubtitle","timelineStepImageUrl","timelineStepImageId","timelineStepImageAlt","timelineStepImageCaption","timelineStepImageDescription","timelineStepIconUrl","timelineStepIconId","timelineStepIconAlt","hasStepPicture","hasStepIcon","onChangeTimelineStepTitle","onChangeTimelineDescription","setImageAttributes","media","url","id","alt","caption","description","removeImageAttributes","setIconAttributes","console","log","removeIconAttributes","createElement","Fragment","className","title","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","label","onClick","isActive","multiple","handleUpload","tagName","placeholder","value","onChange","allowedBlocks","registerBlockType","metadata","Save","navigation","foreground","version","x","y","viewBox","d","supports","edit","save","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/timeline/build/timeline-step/style-index.css b/blocks/timeline/build/timeline-step/style-index.css new file mode 100644 index 0000000..ac621a9 --- /dev/null +++ b/blocks/timeline/build/timeline-step/style-index.css @@ -0,0 +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/timeline-step/style.scss ***! + \*****************************************************************************************************************************************************************************************************************************************************/ + diff --git a/blocks/timeline/src/block.json b/blocks/timeline/src/block.json index e6a4073..24627ab 100644 --- a/blocks/timeline/src/block.json +++ b/blocks/timeline/src/block.json @@ -14,6 +14,19 @@ "editorStyle": "file:./index.css", "style": "file:./style-index.css", "attributes": { + "hasLateralCover": { + "type": "boolean", + "default": false + }, + "lateralCoverId": { + "type": "number" + }, + "lateralCoverUrl": { + "type": "string" + }, + "lateralCoverAlt": { + "type": "string" + }, "hasStepPictures": { "type": "boolean", "default": true diff --git a/blocks/timeline/src/edit.js b/blocks/timeline/src/edit.js index 4ed3a63..3d69829 100644 --- a/blocks/timeline/src/edit.js +++ b/blocks/timeline/src/edit.js @@ -2,21 +2,41 @@ import { __ } from "@wordpress/i18n"; import "./editor.scss"; import "./timeline-step"; -import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; -import { InspectorControls } from "@wordpress/block-editor"; +import { + useBlockProps, + RichText, + InnerBlocks, + InspectorControls, + MediaReplaceFlow, + MediaPlaceholder, +} from "@wordpress/block-editor"; + import { useEffect } from "@wordpress/element"; import { useSelect, dispatch } from "@wordpress/data"; - import { PanelBody, PanelRow, + Button, RadioControl, FormToggle, + __experimentalToggleGroupControl as ToggleGroupControl, + __experimentalToggleGroupControlOption as ToggleGroupControlOption, } from "@wordpress/components"; import { trash } from "@wordpress/icons"; - +import ImageMediaPlaceholder from "../../_components/ImageMediaPlaceholder"; +import Image from "../../_components/Image"; +import ImagePanelBody from "../../_components/ImagePanelBody"; +import ImagePanelBodyContent from "../../_components/ImagePanelBodyContent"; export default function Edit({ attributes, setAttributes, clientId }) { - let { hasStepPictures, stepPictureFormat, hasStepIcons } = attributes; + let { + hasStepPictures, + stepPictureFormat, + hasStepIcons, + hasLateralCover, + lateralCoverId, + lateralCoverAlt, + lateralCoverUrl, + } = attributes; let children = useSelect( (select) => @@ -32,6 +52,30 @@ export default function Edit({ attributes, setAttributes, clientId }) { function onChangehasStepIcons() { setAttributes({ hasStepIcons: !hasStepIcons }); } + function onChangeImagesDispositionType(disposition) { + console.log(disposition); + if (disposition === "hasStepPictures") { + setAttributes({ hasStepPictures: true, hasLateralCover: false }); + removeLateralCoverAttributes(); + } + if (disposition === "hasLateralCover") { + setAttributes({ hasStepPictures: false, hasLateralCover: true }); + } + } + function setLateralCoverAttributes(cover) { + setAttributes({ + lateralCoverId: cover.id, + lateralCoverAlt: cover.alt, + lateralCoverUrl: cover.url, + }); + } + function removeLateralCoverAttributes() { + setAttributes({ + lateralCoverId: null, + lateralCoverAlt: null, + lateralCoverUrl: null, + }); + } function updateChildrensProps(children) { children.forEach((child) => { @@ -48,6 +92,23 @@ export default function Edit({ attributes, setAttributes, clientId }) { } }, [children, hasStepPictures, hasStepIcons]); + const TEMPLATE = [ + [ + "homegrade-content-blocks/timeline-step", + { + timelineStepTitle: "Etape 1", + timelineStepSubtitle: "sous titre", + }, + ], + [ + "homegrade-content-blocks/timeline-step", + { + timelineStepTitle: "Etape 2", + timelineStepSubtitle: "sous titre", + }, + ], + ]; + return ( <> @@ -56,7 +117,9 @@ export default function Edit({ attributes, setAttributes, clientId }) { "Variantes de Timeline", "homegrade-blocks__texte-backoffice" )} - className={"homegrade-blocks-timeline__panel-body"} + className={ + "homegrade-blocks-timeline__panel-body homegrade-blocks-components-image__panel-body" + } > @@ -66,13 +129,26 @@ export default function Edit({ attributes, setAttributes, clientId }) { onChange={onChangehasStepIcons} /> + - - + + + + {hasStepPictures && ( @@ -89,17 +165,66 @@ export default function Edit({ attributes, setAttributes, clientId }) { /> )} + {lateralCoverUrl && ( + {lateralCoverAlt} + )} + + {hasLateralCover && ( +
+ + {lateralCoverUrl && ( + <> +
+ )}
+ {hasLateralCover && !lateralCoverUrl && ( + + )} + {hasLateralCover && lateralCoverUrl && ( + {lateralCoverAlt} + )}
diff --git a/blocks/timeline/src/editor.scss b/blocks/timeline/src/editor.scss index cc9a5b3..6dc24c1 100644 --- a/blocks/timeline/src/editor.scss +++ b/blocks/timeline/src/editor.scss @@ -4,6 +4,9 @@ z-index: 0 !important; } } + .components-placeholder { + max-height: 300px; + } .homegrade-blocks-timeline-step { &__icon { @@ -21,9 +24,9 @@ } .homegrade-blocks-timeline__panel-body { - // label { - // text-transform: uppercase; - // } + > img { + max-height: 150px; + } } .homegrade-blocks-timeline-step__panel-body { .components-tip { diff --git a/blocks/timeline/src/save.js b/blocks/timeline/src/save.js index 393fd75..2ecf5e8 100644 --- a/blocks/timeline/src/save.js +++ b/blocks/timeline/src/save.js @@ -1,17 +1,32 @@ import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; export default function save({ attributes }) { - let { hasStepPictures, stepPictureFormat, hasStepIcons } = attributes; + let { + hasStepPictures, + stepPictureFormat, + hasStepIcons, + hasLateralCover, + lateralCoverUrl, + lateralCoverAlt, + } = attributes; return (
- + {hasLateralCover && {lateralCoverAlt}} +
+ +
); }