diff --git a/blocks/timeline/build/index.asset.php b/blocks/timeline/build/index.asset.php
index 274051c..5289362 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' => 'd17b816af1e1c29986b9');
+ array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '181e808e8d1c28dfc203');
diff --git a/blocks/timeline/build/index.css b/blocks/timeline/build/index.css
index ffdef9e..7d42c60 100644
--- a/blocks/timeline/build/index.css
+++ b/blocks/timeline/build/index.css
@@ -1,10 +1,25 @@
/*!****************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!
\****************************************************************************************************************************************************************************************************************************************/
+.homegrade-blocks-timeline--has-step-icons:before {
+ z-index: 0 !important;
+}
+.homegrade-blocks-timeline .homegrade-blocks-timeline-step__icon .please-add-icon {
+ text-align: center;
+ color: #e04d42;
+ font-weight: 600;
+ margin: auto;
+}
.homegrade-blocks-timeline .homegrade-blocks-timeline-step .block-editor-media-placeholder {
margin-bottom: 30px;
}
+.homegrade-blocks-timeline-step__panel-body .components-tip {
+ margin: 10px 0;
+}
+.homegrade-blocks-timeline-step__panel-body--icon img {
+ max-height: 60px;
+}
.homegrade-blocks-timeline-step__panel-body .components-dropdown .components-toolbar__control {
background-color: #e04d42;
color: white;
diff --git a/blocks/timeline/build/index.css.map b/blocks/timeline/build/index.css.map
index f4dc394..6a2b64a 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;;AAYC;EACC;EACA;AATF;AAWC;EACC;AATF;AAWC;EACC;EACA;EAAA;AATF;AAWC;EACC;EACA;EACA;EACA;AATF,C","sources":["webpack://multiblocks/./src/editor.scss"],"sourcesContent":[".homegrade-blocks-timeline {\r\n\t.homegrade-blocks-timeline-step {\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-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;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
diff --git a/blocks/timeline/build/index.js b/blocks/timeline/build/index.js
index 10825d4..636cbf2 100644
--- a/blocks/timeline/build/index.js
+++ b/blocks/timeline/build/index.js
@@ -107,7 +107,7 @@ function Edit({
onChange: handleStepPictureFormatChange
})))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({
- className: `homegrade-blocks-timeline`
+ className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""}`
})
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, {
allowedBlocks: ["homegrade-content-blocks/timeline-step"]
@@ -190,9 +190,14 @@ __webpack_require__.r(__webpack_exports__);
function save({
attributes
}) {
+ let {
+ hasStepPictures,
+ stepPictureFormat,
+ hasStepIcons
+ } = attributes;
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", {
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
- className: `homegrade-blocks-timeline`
+ className: `homegrade-blocks-timeline ${hasStepIcons ? "homegrade-blocks-timeline--has-step-icons" : ""}`
})
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null));
}
@@ -227,6 +232,7 @@ __webpack_require__.r(__webpack_exports__);
+
function Edit({
attributes,
setAttributes,
@@ -238,6 +244,8 @@ function Edit({
timelineStepImageUrl,
timelineStepImageId,
timelineStepImageAlt,
+ timelineStepImageCaption,
+ timelineStepImageDescription,
timelineStepIconUrl,
timelineStepIconId,
timelineStepIconAlt,
@@ -255,18 +263,23 @@ function Edit({
});
}
function setImageAttributes(media) {
+ console.log(media);
if (!media || !media.url) {
setAttributes({
timelineStepImageUrl: null,
timelineStepImageId: null,
- timelineStepImageAlt: null
+ timelineStepImageAlt: null,
+ timelineStepImageCaption: null,
+ timelineStepImageDescription: null
});
return;
}
setAttributes({
timelineStepImageUrl: media.url,
timelineStepImageId: media.id,
- timelineStepImageAlt: media?.alt
+ timelineStepImageAlt: media?.alt,
+ timelineStepImageCaption: media?.caption,
+ timelineStepImageDescription: media?.description
});
}
function removeImageAttributes() {
@@ -292,6 +305,13 @@ function Edit({
timelineStepIconAlt: media?.alt
});
}
+ function removeIconAttributes() {
+ setAttributes({
+ timelineStepIconUrl: null,
+ timelineStepIconId: null,
+ timelineStepIconAlt: null
+ });
+ }
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
if (hasStepPicture === false) {
setImageAttributes(null);
@@ -304,7 +324,7 @@ function Edit({
}, [hasStepIcon]);
console.log(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"]);
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, hasStepPicture && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
- className: "homegrade-blocks-timeline-step__panel-body",
+ className: "homegrade-blocks-timeline-step__panel-body homegrade-blocks-timeline-step__panel-body--image",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Image", "homegrade-blocks__texte-backoffice")
}, timelineStepImageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepImageUrl,
@@ -318,31 +338,34 @@ function Edit({
accept: "image/*",
onSelect: setImageAttributes,
name: !timelineStepImageUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice")
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
+ }), timelineStepImageUrl && (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_4__.Button, {
className: "custom-flow-button",
variant: "primary",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
- label: "Supprimer"
- }))), hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
+ label: "Supprimer",
+ onClick: removeImageAttributes
+ }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.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_4__.Tip, null, "Si besoin, Utilisez le champ \"Description\" de la m\xE9diath\xE8que pour donner afficher une description de votre image")), hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
+ className: "homegrade-blocks-timeline-step__panel-body homegrade-blocks-timeline-step__panel-body--icon",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Icone", "homegrade-blocks__texte-backoffice")
}, timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepIconUrl,
alt: timelineStepIconAlt
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
+ }), (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: timelineStepIconId,
mediaUrl: timelineStepIconUrl,
allowedTypes: ["image"],
accept: "image/*",
- onSelect: setIconAttributes
- // name={
- // !timelineStepIconUrl
- // ? __(
- // "Ajouter une Image",
- // "homegrade-blocks__texte-backoffice"
- // )
- // : __("Remplacer Image", "homegrade-blocks__texte-backoffice")
- // }
- }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarGroup, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
+ onSelect: setIconAttributes,
+ name: !timelineStepIconUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice")
+ }), timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
+ className: "custom-flow-button",
+ variant: "primary",
+ icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
+ label: "Supprimer",
+ onClick: removeIconAttributes
+ })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarGroup, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
mediaId: timelineStepImageId,
mediaUrl: timelineStepImageUrl,
allowedTypes: ["image"],
@@ -369,8 +392,17 @@ function Edit({
}), timelineStepImageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepImageUrl,
alt: timelineStepImageAlt
+ }), timelineStepImageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, timelineStepImageDescription), timelineStepImageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, timelineStepImageCaption)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: `homegrade-blocks-timeline-step__content`
+ }, hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: "homegrade-blocks-timeline-step__icon"
+ }, !timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
+ className: "please-add-icon"
+ }, "Ajoutez une icone !"), timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ src: timelineStepIconUrl,
+ alt: timelineStepIconAlt
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
- className: "homegrade-blocks-timeline-step__content"
+ className: "homegrade-blocks-timeline-step__text-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
tagName: "h3",
className: "homegrade-blocks-timeline-step__title",
@@ -385,7 +417,7 @@ function Edit({
onChange: onChangeTimelineDescription
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
allowedBlocks: ["core/paragraph"]
- }))));
+ })))));
}
/***/ }),
@@ -456,9 +488,12 @@ function save({
const {
timelineStepTitle,
timelineStepSubtitle,
- timelineStepImageId,
timelineStepImageUrl,
timelineStepImageAlt,
+ timelineStepImageCaption,
+ timelineStepImageDescription,
+ timelineStepIconUrl,
+ timelineStepIconAlt,
hasStepPicture,
hasStepIcon
} = attributes;
@@ -466,13 +501,24 @@ function save({
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
className: `homegrade-blocks-timeline-step`
})
- }, hasStepPicture && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ }, hasStepPicture && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", {
className: "homegrade-blocks-timeline-step__cover"
}, timelineStepImageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepImageUrl,
alt: timelineStepImageAlt
+ }), (timelineStepImageDescription || timelineStepImageCaption) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", null, timelineStepImageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
+ className: "description"
+ }, timelineStepImageDescription), timelineStepImageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
+ className: "caption"
+ }, timelineStepImageCaption))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: `homegrade-blocks-timeline-step__content`
+ }, hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: "homegrade-blocks-timeline-step__icon"
+ }, timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ src: timelineStepIconUrl,
+ alt: timelineStepIconAlt
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
- className: "homegrade-blocks-timeline-step__content"
+ className: "homegrade-blocks-timeline-step__text-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
tagName: "h3",
className: "homegrade-blocks-timeline-step__title",
@@ -481,7 +527,7 @@ function save({
tagName: "p",
className: "homegrade-blocks-timeline-step__subtitle",
value: timelineStepSubtitle
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null)));
+ }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null))));
}
/***/ }),
@@ -651,7 +697,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json
\**************************************/
/***/ ((module) => {
-module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline-step","version":"0.1.0","title":"Étape de timeline","category":"homegrade-blocks","description":"Bloc d\'étape de timeline","supports":{"html":false},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"timelineStepTitle":{"type":"string","default":""},"timelineStepSubtitle":{"type":"string","default":""},"timelineStepImageUrl":{"type":"string"},"timelineStepImageId":{"type":"number"},"timelineStepImageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"timelineStepIconUrl":{"type":"string"},"timelineStepIconId":{"type":"number"},"timelineStepIconAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"hasStepIcon":{"type":"boolean","default":true},"hasStepPicture":{"type":"boolean","default":true}}}');
+module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline-step","version":"0.1.0","title":"Étape de timeline","category":"homegrade-blocks","description":"Bloc d\'étape de timeline","supports":{"html":false},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"timelineStepTitle":{"type":"string","default":""},"timelineStepSubtitle":{"type":"string","default":""},"timelineStepImageUrl":{"type":"string"},"timelineStepImageId":{"type":"number"},"timelineStepImageCaption":{"type":"string"},"timelineStepImageDescription":{"type":"string"},"timelineStepImageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"timelineStepIconUrl":{"type":"string"},"timelineStepIconId":{"type":"number"},"timelineStepIconAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"hasStepIcon":{"type":"boolean","default":true},"hasStepPicture":{"type":"boolean","default":true}}}');
/***/ })
diff --git a/blocks/timeline/build/index.js.map b/blocks/timeline/build/index.js.map
index a3afbc6..f2c2112 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;AAK9C;AACc;AACO;AASvB;AACU;AAE1B,SAASiB,IAAIA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,QAAQ;EACR,GAAGC;AACJ,CAAC,EAAE;EACF,IAAI;IAAEC,eAAe;IAAEC,iBAAiB;IAAEC;EAAa,CAAC,GAAGN,UAAU;EAErE,IAAIO,QAAQ,GAAGjB,0DAAS,CACtBkB,MAAM,IACNA,MAAM,CAAC,mBAAmB,CAAC,CAACC,mBAAmB,CAACP,QAAQ,CAAC,CAAC,CAAC,CAAC,CAACQ,WAC/D,CAAC;EAED,SAASC,6BAA6BA,CAACN,iBAAiB,EAAE;IACzDJ,aAAa,CAAC;MAAEI;IAAkB,CAAC,CAAC;EACrC;EACA,SAASO,uBAAuBA,CAAA,EAAG;IAClCX,aAAa,CAAC;MAAEG,eAAe,EAAE,CAACA;IAAgB,CAAC,CAAC;EACrD;EACA,SAASS,oBAAoBA,CAAA,EAAG;IAC/BZ,aAAa,CAAC;MAAEK,YAAY,EAAE,CAACA;IAAa,CAAC,CAAC;EAC/C;EAEA,SAASQ,oBAAoBA,CAACP,QAAQ,EAAE;IACvCA,QAAQ,CAACQ,OAAO,CAAEC,KAAK,IAAK;MAC3BzB,yDAAQ,CAAC,mBAAmB,CAAC,CAAC0B,qBAAqB,CAACD,KAAK,CAACd,QAAQ,EAAE;QACnEgB,WAAW,EAAEZ,YAAY;QACzBa,cAAc,EAAEf;MACjB,CAAC,CAAC;IACH,CAAC,CAAC;EACH;EAEAf,6DAAS,CAAC,MAAM;IACf,IAAIkB,QAAQ,IAAIA,QAAQ,CAACa,MAAM,GAAG,CAAC,EAAE;MACpCN,oBAAoB,CAACP,QAAQ,CAAC;IA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;;;;;;;;ACAA;;;;;;;;;;;;ACAA;;;;;;;;;;;;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;;;;;;;;;;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/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":["import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport \"./timeline-step\";\n\nimport { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\nimport {\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\nimport { useEffect } from \"@wordpress/element\";\nimport { useSelect, dispatch } from \"@wordpress/data\";\n\nimport {\n\tPanelBody,\n\tPanelRow,\n\tToolbarGroup,\n\tToolbarButton,\n\tRadioControl,\n\tFormToggle,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\t...props\n}) {\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\tIcones \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\tImages \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>\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\treturn (\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\tFormToggle,\n\tPanelRow,\n\tButton,\n} from \"@wordpress/components\";\nimport { useEffect } from \"@wordpress/element\";\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\nimport { trash } from \"@wordpress/icons\";\n\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\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});\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});\n\t}\n\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\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\tconsole.log(trash);\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 \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 \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 \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\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
\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t)}\n\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","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\ttimelineStepImageId,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageAlt,\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
\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 \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","MediaReplaceFlow","MediaPlaceholder","useEffect","useSelect","dispatch","PanelBody","PanelRow","ToolbarGroup","ToolbarButton","RadioControl","FormToggle","trash","Edit","attributes","setAttributes","clientId","props","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","Button","timelineStepTitle","timelineStepSubtitle","timelineStepImageUrl","timelineStepImageId","timelineStepImageAlt","timelineStepIconUrl","timelineStepIconId","timelineStepIconAlt","onChangeTimelineStepTitle","onChangeTimelineDescription","setImageAttributes","media","url","id","alt","removeImageAttributes","setIconAttributes","console","log","mediaId","mediaUrl","allowedTypes","accept","onSelect","variant","isActive","onClick","multiple","handleUpload","tagName","placeholder","Save","navigation","version","supports"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AACE;AAEsD;AAK9C;AACc;AACO;AASvB;AACU;AAE1B,SAASiB,IAAIA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,QAAQ;EACR,GAAGC;AACJ,CAAC,EAAE;EACF,IAAI;IAAEC,eAAe;IAAEC,iBAAiB;IAAEC;EAAa,CAAC,GAAGN,UAAU;EAErE,IAAIO,QAAQ,GAAGjB,0DAAS,CACtBkB,MAAM,IACNA,MAAM,CAAC,mBAAmB,CAAC,CAACC,mBAAmB,CAACP,QAAQ,CAAC,CAAC,CAAC,CAAC,CAACQ,WAC/D,CAAC;EAED,SAASC,6BAA6BA,CAACN,iBAAiB,EAAE;IACzDJ,aAAa,CAAC;MAAEI;IAAkB,CAAC,CAAC;EACrC;EACA,SAASO,uBAAuBA,CAAA,EAAG;IAClCX,aAAa,CAAC;MAAEG,eAAe,EAAE,CAACA;IAAgB,CAAC,CAAC;EACrD;EACA,SAASS,oBAAoBA,CAAA,EAAG;IAC/BZ,aAAa,CAAC;MAAEK,YAAY,EAAE,CAACA;IAAa,CAAC,CAAC;EAC/C;EAEA,SAASQ,oBAAoBA,CAACP,QAAQ,EAAE;IACvCA,QAAQ,CAACQ,OAAO,CAAEC,KAAK,IAAK;MAC3BzB,yDAAQ,CAAC,mBAAmB,CAAC,CAAC0B,qBAAqB,CAACD,KAAK,CAACd,QAAQ,EAA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;;;;;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/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":["import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport \"./timeline-step\";\n\nimport { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\nimport {\n\tInspectorControls,\n\tMediaReplaceFlow,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\nimport { useEffect } from \"@wordpress/element\";\nimport { useSelect, dispatch } from \"@wordpress/data\";\n\nimport {\n\tPanelBody,\n\tPanelRow,\n\tToolbarGroup,\n\tToolbarButton,\n\tRadioControl,\n\tFormToggle,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({\n\tattributes,\n\tsetAttributes,\n\tclientId,\n\t...props\n}) {\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\tIcones \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\tImages \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>\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);\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\tFormToggle,\n\tPanelRow,\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\tconsole.log(trash);\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 \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 \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
\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
\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 \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
\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","MediaReplaceFlow","MediaPlaceholder","useEffect","useSelect","dispatch","PanelBody","PanelRow","ToolbarGroup","ToolbarButton","RadioControl","FormToggle","trash","Edit","attributes","setAttributes","clientId","props","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","Button","Tip","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
diff --git a/blocks/timeline/build/timeline-step/block.json b/blocks/timeline/build/timeline-step/block.json
index 0e79cc1..3724989 100644
--- a/blocks/timeline/build/timeline-step/block.json
+++ b/blocks/timeline/build/timeline-step/block.json
@@ -27,6 +27,12 @@
"timelineStepImageId": {
"type": "number"
},
+ "timelineStepImageCaption": {
+ "type": "string"
+ },
+ "timelineStepImageDescription": {
+ "type": "string"
+ },
"timelineStepImageAlt": {
"type": "string",
"source": "attribute",
diff --git a/blocks/timeline/build/timeline-step/index.asset.php b/blocks/timeline/build/timeline-step/index.asset.php
index 46f4535..0590b7b 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' => 'cdf5fd0662ba5ec07221');
+ array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'ca09a65ad3167763d811');
diff --git a/blocks/timeline/build/timeline-step/index.js b/blocks/timeline/build/timeline-step/index.js
index d67bd5a..f8f765e 100644
--- a/blocks/timeline/build/timeline-step/index.js
+++ b/blocks/timeline/build/timeline-step/index.js
@@ -30,6 +30,7 @@ __webpack_require__.r(__webpack_exports__);
+
function Edit({
attributes,
setAttributes,
@@ -41,6 +42,8 @@ function Edit({
timelineStepImageUrl,
timelineStepImageId,
timelineStepImageAlt,
+ timelineStepImageCaption,
+ timelineStepImageDescription,
timelineStepIconUrl,
timelineStepIconId,
timelineStepIconAlt,
@@ -58,18 +61,23 @@ function Edit({
});
}
function setImageAttributes(media) {
+ console.log(media);
if (!media || !media.url) {
setAttributes({
timelineStepImageUrl: null,
timelineStepImageId: null,
- timelineStepImageAlt: null
+ timelineStepImageAlt: null,
+ timelineStepImageCaption: null,
+ timelineStepImageDescription: null
});
return;
}
setAttributes({
timelineStepImageUrl: media.url,
timelineStepImageId: media.id,
- timelineStepImageAlt: media?.alt
+ timelineStepImageAlt: media?.alt,
+ timelineStepImageCaption: media?.caption,
+ timelineStepImageDescription: media?.description
});
}
function removeImageAttributes() {
@@ -95,6 +103,13 @@ function Edit({
timelineStepIconAlt: media?.alt
});
}
+ function removeIconAttributes() {
+ setAttributes({
+ timelineStepIconUrl: null,
+ timelineStepIconId: null,
+ timelineStepIconAlt: null
+ });
+ }
(0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
if (hasStepPicture === false) {
setImageAttributes(null);
@@ -107,7 +122,7 @@ function Edit({
}, [hasStepIcon]);
console.log(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"]);
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, hasStepPicture && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
- className: "homegrade-blocks-timeline-step__panel-body",
+ className: "homegrade-blocks-timeline-step__panel-body homegrade-blocks-timeline-step__panel-body--image",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Image", "homegrade-blocks__texte-backoffice")
}, timelineStepImageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepImageUrl,
@@ -121,31 +136,34 @@ function Edit({
accept: "image/*",
onSelect: setImageAttributes,
name: !timelineStepImageUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice")
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
+ }), timelineStepImageUrl && (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_4__.Button, {
className: "custom-flow-button",
variant: "primary",
icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
- label: "Supprimer"
- }))), hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
+ label: "Supprimer",
+ onClick: removeImageAttributes
+ }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.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_4__.Tip, null, "Si besoin, Utilisez le champ \"Description\" de la m\xE9diath\xE8que pour donner afficher une description de votre image")), hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelBody, {
+ className: "homegrade-blocks-timeline-step__panel-body homegrade-blocks-timeline-step__panel-body--icon",
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Icone", "homegrade-blocks__texte-backoffice")
}, timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepIconUrl,
alt: timelineStepIconAlt
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
+ }), (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: timelineStepIconId,
mediaUrl: timelineStepIconUrl,
allowedTypes: ["image"],
accept: "image/*",
- onSelect: setIconAttributes
- // name={
- // !timelineStepIconUrl
- // ? __(
- // "Ajouter une Image",
- // "homegrade-blocks__texte-backoffice"
- // )
- // : __("Remplacer Image", "homegrade-blocks__texte-backoffice")
- // }
- }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarGroup, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
+ onSelect: setIconAttributes,
+ name: !timelineStepIconUrl ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ajouter", "homegrade-blocks__texte-backoffice") : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Remplacer", "homegrade-blocks__texte-backoffice")
+ }), timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
+ className: "custom-flow-button",
+ variant: "primary",
+ icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
+ label: "Supprimer",
+ onClick: removeIconAttributes
+ })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToolbarGroup, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaReplaceFlow, {
mediaId: timelineStepImageId,
mediaUrl: timelineStepImageUrl,
allowedTypes: ["image"],
@@ -172,8 +190,17 @@ function Edit({
}), timelineStepImageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepImageUrl,
alt: timelineStepImageAlt
+ }), timelineStepImageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, timelineStepImageDescription), timelineStepImageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, timelineStepImageCaption)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: `homegrade-blocks-timeline-step__content`
+ }, hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: "homegrade-blocks-timeline-step__icon"
+ }, !timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
+ className: "please-add-icon"
+ }, "Ajoutez une icone !"), timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ src: timelineStepIconUrl,
+ alt: timelineStepIconAlt
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
- className: "homegrade-blocks-timeline-step__content"
+ className: "homegrade-blocks-timeline-step__text-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, {
tagName: "h3",
className: "homegrade-blocks-timeline-step__title",
@@ -188,7 +215,7 @@ function Edit({
onChange: onChangeTimelineDescription
}), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
allowedBlocks: ["core/paragraph"]
- }))));
+ })))));
}
/***/ }),
@@ -259,9 +286,12 @@ function save({
const {
timelineStepTitle,
timelineStepSubtitle,
- timelineStepImageId,
timelineStepImageUrl,
timelineStepImageAlt,
+ timelineStepImageCaption,
+ timelineStepImageDescription,
+ timelineStepIconUrl,
+ timelineStepIconAlt,
hasStepPicture,
hasStepIcon
} = attributes;
@@ -269,13 +299,24 @@ function save({
..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
className: `homegrade-blocks-timeline-step`
})
- }, hasStepPicture && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ }, hasStepPicture && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figure", {
className: "homegrade-blocks-timeline-step__cover"
}, timelineStepImageUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
src: timelineStepImageUrl,
alt: timelineStepImageAlt
+ }), (timelineStepImageDescription || timelineStepImageCaption) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("figcaption", null, timelineStepImageDescription && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
+ className: "description"
+ }, timelineStepImageDescription), timelineStepImageCaption && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", {
+ className: "caption"
+ }, timelineStepImageCaption))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: `homegrade-blocks-timeline-step__content`
+ }, hasStepIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
+ className: "homegrade-blocks-timeline-step__icon"
+ }, timelineStepIconUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", {
+ src: timelineStepIconUrl,
+ alt: timelineStepIconAlt
})), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
- className: "homegrade-blocks-timeline-step__content"
+ className: "homegrade-blocks-timeline-step__text-content"
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, {
tagName: "h3",
className: "homegrade-blocks-timeline-step__title",
@@ -284,7 +325,7 @@ function save({
tagName: "p",
className: "homegrade-blocks-timeline-step__subtitle",
value: timelineStepSubtitle
- }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null)));
+ }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null))));
}
/***/ }),
@@ -410,7 +451,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-step","version":"0.1.0","title":"Étape de timeline","category":"homegrade-blocks","description":"Bloc d\'étape de timeline","supports":{"html":false},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"timelineStepTitle":{"type":"string","default":""},"timelineStepSubtitle":{"type":"string","default":""},"timelineStepImageUrl":{"type":"string"},"timelineStepImageId":{"type":"number"},"timelineStepImageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"timelineStepIconUrl":{"type":"string"},"timelineStepIconId":{"type":"number"},"timelineStepIconAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"hasStepIcon":{"type":"boolean","default":true},"hasStepPicture":{"type":"boolean","default":true}}}');
+module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/timeline-step","version":"0.1.0","title":"Étape de timeline","category":"homegrade-blocks","description":"Bloc d\'étape de timeline","supports":{"html":false},"editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"timelineStepTitle":{"type":"string","default":""},"timelineStepSubtitle":{"type":"string","default":""},"timelineStepImageUrl":{"type":"string"},"timelineStepImageId":{"type":"number"},"timelineStepImageCaption":{"type":"string"},"timelineStepImageDescription":{"type":"string"},"timelineStepImageAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"timelineStepIconUrl":{"type":"string"},"timelineStepIconId":{"type":"number"},"timelineStepIconAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"hasStepIcon":{"type":"boolean","default":true},"hasStepPicture":{"type":"boolean","default":true}}}');
/***/ })
diff --git a/blocks/timeline/build/timeline-step/index.js.map b/blocks/timeline/build/timeline-step/index.js.map
index e5cfeea..41fe485 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":";;;;;;;;;;;;;;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;;;;;;;;;;;;;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\tFormToggle,\n\tPanelRow,\n\tButton,\n} from \"@wordpress/components\";\nimport { useEffect } from \"@wordpress/element\";\nimport { MediaReplaceFlow, MediaPlaceholder } from \"@wordpress/block-editor\";\nimport { trash } from \"@wordpress/icons\";\n\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\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});\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});\n\t}\n\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\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\tconsole.log(trash);\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 \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 \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 \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\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
\n\t\t\t\t\t\t)}\n\t\t\t\t\t
\n\t\t\t\t)}\n\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","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\ttimelineStepImageId,\n\t\ttimelineStepImageUrl,\n\t\ttimelineStepImageAlt,\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
\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 \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","FormToggle","PanelRow","Button","useEffect","MediaReplaceFlow","MediaPlaceholder","trash","Edit","attributes","setAttributes","props","timelineStepTitle","timelineStepSubtitle","timelineStepImageUrl","timelineStepImageId","timelineStepImageAlt","timelineStepIconUrl","timelineStepIconId","timelineStepIconAlt","hasStepPicture","hasStepIcon","onChangeTimelineStepTitle","onChangeTimelineDescription","setImageAttributes","media","url","id","alt","removeImageAttributes","setIconAttributes","console","log","createElement","Fragment","className","title","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","label","isActive","onClick","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;AAQF;AACgB;AAC8B;AACpC;AACG;AAC7B,SAASiB,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;IACl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EAAa,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\tFormToggle,\n\tPanelRow,\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\tconsole.log(trash);\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 \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 \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
\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
\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 \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
\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","FormToggle","PanelRow","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
diff --git a/blocks/timeline/src/edit.js b/blocks/timeline/src/edit.js
index 37ecf9f..3abda51 100644
--- a/blocks/timeline/src/edit.js
+++ b/blocks/timeline/src/edit.js
@@ -104,7 +104,9 @@ export default function Edit({
diff --git a/blocks/timeline/src/timeline-step/block.json b/blocks/timeline/src/timeline-step/block.json
index 9e1b6e4..b614063 100644
--- a/blocks/timeline/src/timeline-step/block.json
+++ b/blocks/timeline/src/timeline-step/block.json
@@ -27,6 +27,12 @@
"timelineStepImageId": {
"type": "number"
},
+ "timelineStepImageCaption": {
+ "type": "string"
+ },
+ "timelineStepImageDescription": {
+ "type": "string"
+ },
"timelineStepImageAlt": {
"type": "string",
"source": "attribute",
diff --git a/blocks/timeline/src/timeline-step/edit.js b/blocks/timeline/src/timeline-step/edit.js
index f144ae9..ba2ccdf 100644
--- a/blocks/timeline/src/timeline-step/edit.js
+++ b/blocks/timeline/src/timeline-step/edit.js
@@ -19,7 +19,7 @@ import {
import { useEffect } from "@wordpress/element";
import { MediaReplaceFlow, MediaPlaceholder } from "@wordpress/block-editor";
import { trash } from "@wordpress/icons";
-
+import { Tip } from "@wordpress/components";
export default function Edit({ attributes, setAttributes, ...props }) {
let {
timelineStepTitle,
@@ -27,6 +27,8 @@ export default function Edit({ attributes, setAttributes, ...props }) {
timelineStepImageUrl,
timelineStepImageId,
timelineStepImageAlt,
+ timelineStepImageCaption,
+ timelineStepImageDescription,
timelineStepIconUrl,
timelineStepIconId,
timelineStepIconAlt,
@@ -41,11 +43,14 @@ export default function Edit({ attributes, setAttributes, ...props }) {
setAttributes({ timelineStepSubtitle });
}
function setImageAttributes(media) {
+ console.log(media);
if (!media || !media.url) {
setAttributes({
timelineStepImageUrl: null,
timelineStepImageId: null,
timelineStepImageAlt: null,
+ timelineStepImageCaption: null,
+ timelineStepImageDescription: null,
});
return;
}
@@ -53,9 +58,10 @@ export default function Edit({ attributes, setAttributes, ...props }) {
timelineStepImageUrl: media.url,
timelineStepImageId: media.id,
timelineStepImageAlt: media?.alt,
+ timelineStepImageCaption: media?.caption,
+ timelineStepImageDescription: media?.description,
});
}
-
function removeImageAttributes() {
setAttributes({
timelineStepImageUrl: null,
@@ -81,6 +87,14 @@ export default function Edit({ attributes, setAttributes, ...props }) {
});
}
+ function removeIconAttributes() {
+ setAttributes({
+ timelineStepIconUrl: null,
+ timelineStepIconId: null,
+ timelineStepIconAlt: null,
+ });
+ }
+
useEffect(() => {
if (hasStepPicture === false) {
setImageAttributes(null);
@@ -99,7 +113,7 @@ export default function Edit({ attributes, setAttributes, ...props }) {
{hasStepPicture && (
{timelineStepImageUrl && (
@@ -118,35 +132,59 @@ export default function Edit({ attributes, setAttributes, ...props }) {
: __("Remplacer", "homegrade-blocks__texte-backoffice")
}
/>
-
+ {timelineStepImageUrl && (
+ <>
+
+ >
+ )}
+
+ Si besoin, Utilisez le champ "Légende"de la médiathèque pour
+ afficher un copyright
+
+
+ Si besoin, Utilisez le champ "Description" de la médiathèque pour
+ donner afficher une description de votre image
+
)}
{hasStepIcon && (
-
+
{timelineStepIconUrl && (
)}
-
+
+
+ {timelineStepIconUrl && (
+
+ )}
+
)}
@@ -192,31 +230,49 @@ export default function Edit({ attributes, setAttributes, ...props }) {
{timelineStepImageUrl && (
)}
+ {timelineStepImageDescription && (
+ {timelineStepImageDescription}
+ )}
+ {timelineStepImageCaption && {timelineStepImageCaption}
}
)}
-
-
-
-
+
+ {hasStepIcon && (
+
+ {!timelineStepIconUrl && (
+
Ajoutez une icone !
+ )}
+
+ {timelineStepIconUrl && (
+
+ )}
+
+ )}
+
+
+
+
+
+
>
diff --git a/blocks/timeline/src/timeline-step/save.js b/blocks/timeline/src/timeline-step/save.js
index 49b7a99..dc80197 100644
--- a/blocks/timeline/src/timeline-step/save.js
+++ b/blocks/timeline/src/timeline-step/save.js
@@ -4,9 +4,12 @@ export default function save({ attributes }) {
const {
timelineStepTitle,
timelineStepSubtitle,
- timelineStepImageId,
timelineStepImageUrl,
timelineStepImageAlt,
+ timelineStepImageCaption,
+ timelineStepImageDescription,
+ timelineStepIconUrl,
+ timelineStepIconAlt,
hasStepPicture,
hasStepIcon,
} = attributes;
@@ -17,24 +20,43 @@ export default function save({ attributes }) {
})}
>
{hasStepPicture && (
-
+
{timelineStepImageUrl && (
)}
-
+ {(timelineStepImageDescription || timelineStepImageCaption) && (
+
+ {timelineStepImageDescription && (
+ {timelineStepImageDescription}
+ )}
+ {timelineStepImageCaption && (
+ {timelineStepImageCaption}
+ )}
+
+ )}
+
)}
-
-
-
-
+
+ {hasStepIcon && (
+
+ {timelineStepIconUrl && (
+
+ )}
+
+ )}
+
+
+
+
+
);