From 7b57772c92eb410ed8199f0e02b4ebf4da976d30 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 10 Jul 2024 15:33:58 +0200 Subject: [PATCH] removing unused hasCustomTitle --- blocks/content-page-header/build/block.json | 4 ---- .../content-page-header/build/index.asset.php | 2 +- blocks/content-page-header/build/index.js | 24 ++----------------- blocks/content-page-header/build/index.js.map | 2 +- blocks/content-page-header/src/block.json | 4 ---- blocks/content-page-header/src/edit.js | 22 ----------------- 6 files changed, 4 insertions(+), 54 deletions(-) diff --git a/blocks/content-page-header/build/block.json b/blocks/content-page-header/build/block.json index 0851239..d3ccb01 100644 --- a/blocks/content-page-header/build/block.json +++ b/blocks/content-page-header/build/block.json @@ -17,10 +17,6 @@ "style": "file:./style-index.css", "render": "file:./render.php", "attributes": { - "hasCustomTitle": { - "type": "boolean", - "default": false - }, "pageHeaderTitle": { "type": "string" }, diff --git a/blocks/content-page-header/build/index.asset.php b/blocks/content-page-header/build/index.asset.php index ff8d992..f08549e 100644 --- a/blocks/content-page-header/build/index.asset.php +++ b/blocks/content-page-header/build/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '33d8b36cf2904cb62a91'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'de0da04da745c8c7f08b'); diff --git a/blocks/content-page-header/build/index.js b/blocks/content-page-header/build/index.js index d0597c0..009675c 100644 --- a/blocks/content-page-header/build/index.js +++ b/blocks/content-page-header/build/index.js @@ -142,7 +142,6 @@ function Edit({ setAttributes }) { const { - hasCustomTitle, hasCta, cta, hasCustomImage, @@ -158,16 +157,6 @@ function Edit({ return Image; } }); - function onChangeHasCustomTitle(newHasAutoTitle) { - setAttributes({ - hasCustomTitle: !hasCustomTitle - }); - if (newHasAutoTitle) { - setAttributes({ - blockCustomTitle: undefined - }); - } - } function onChangeHasCustomImage(newHasAutoImage) { setAttributes({ hasCustomImage: !hasCustomImage @@ -225,13 +214,6 @@ function Edit({ }); } return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { - className: "homegrade-blocks-content-page-header__panel-cta", - title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Titre du bloc", "homegrade-blocks") - }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { - label: "Titre automatique", - checked: !hasCustomTitle, - onChange: onChangeHasCustomTitle - }), !hasCustomTitle && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Tip, null, "Le titre est automatiquement g\xE9n\xE9r\xE9 \xE0 partir du titre de la page")), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "homegrade-blocks-components-image__panel-body", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Image d'accompagnement", "homegrade-blocks") }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { @@ -346,10 +328,8 @@ __webpack_require__.r(__webpack_exports__); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_5__.name, { icon: { - foreground: "#f03", + foreground: "#DF1E1E", src: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { - id: "Calque_2", - "data-name": "Calque 2", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 401.94 401.92" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", { @@ -536,7 +516,7 @@ module.exports = window["wp"]["primitives"]; \************************/ /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/content-page-header","version":"0.1.0","title":"Content page header","category":"homegrade-blocks","icon":"smiley","description":"Bloc bannière/header de contenu de premier niveau pour les pages de contenu","supports":{"html":false,"anchor":true},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"hasCustomTitle":{"type":"boolean","default":false},"pageHeaderTitle":{"type":"string"},"hasCta":{"type":"boolean","default":false},"cta":{"type":"object"},"hasCustomImage":{"type":"boolean","default":false},"imageUrl":{"type":"string"},"imageAlt":{"type":"string"},"imageId":{"type":"number"},"imageProportion":{"type":"string","default":"original"},"anchor":{"type":"string"},"coverSize":{"type":"string","default":"medium"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/content-page-header","version":"0.1.0","title":"Content page header","category":"homegrade-blocks","icon":"smiley","description":"Bloc bannière/header de contenu de premier niveau pour les pages de contenu","supports":{"html":false,"anchor":true},"textdomain":"homegrade-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"pageHeaderTitle":{"type":"string"},"hasCta":{"type":"boolean","default":false},"cta":{"type":"object"},"hasCustomImage":{"type":"boolean","default":false},"imageUrl":{"type":"string"},"imageAlt":{"type":"string"},"imageId":{"type":"number"},"imageProportion":{"type":"string","default":"original"},"anchor":{"type":"string"},"coverSize":{"type":"string","default":"medium"}}}'); /***/ }) diff --git a/blocks/content-page-header/build/index.js.map b/blocks/content-page-header/build/index.js.map index b29acba..dfd8888 100644 --- a/blocks/content-page-header/build/index.js.map +++ b/blocks/content-page-header/build/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAgD;AAC+B;AACnC;AAE5C,MAAMK,EAAE,GAAG;EACVC,UAAU,EAAE;IACXC,cAAc,EAAE;MACfC,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDC,gBAAgB,EAAE;MACjBF,IAAI,EAAE;IACP,CAAC;IACDG,eAAe,EAAE;MAChBH,IAAI,EAAE;IACP,CAAC;IACDI,MAAM,EAAE;MACPJ,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDI,GAAG,EAAE;MACJL,IAAI,EAAE;IACP,CAAC;IACDM,cAAc,EAAE;MACfN,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDM,QAAQ,EAAE;MACTP,IAAI,EAAE;IACP,CAAC;IACDQ,QAAQ,EAAE;MACTR,IAAI,EAAE;IACP,CAAC;IACDS,OAAO,EAAE;MACRT,IAAI,EAAE;IACP,CAAC;IACDU,eAAe,EAAE;MAChBV,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE;IACV,CAAC;IACDU,MAAM,EAAE;MACPX,IAAI,EAAE;IACP,CAAC;IACDY,SAAS,EAAE;MACVZ,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE;IACV;EACD,CAAC;EAEDY,IAAIA,CAAC;IAAEf;EAAW,CAAC,EAAE;IACpB,OACCgB,oDAAA;MAAA,GACKrB,kEAAa,CAACoB,IAAI,CAAC;QACtBE,SAAS,EAAG;MACb,CAAC;IAAC,GAEFD,oDAAA,CAACnB,gEAAW,CAACqB,OAAO,MAAE,CAClB,CAAC;EAER,CAAC;EAEDC,OAAOA,CAACnB,UAAU,EAAEoB,WAAW,EAAE;IAChC,MAAM;MAAEhB,gBAAgB;MAAEC,eAAe;MAAE,GAAGg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;AAC/B;AACA;AACA,CAAC,EAAE,iEAAa,CAAC,uDAAI;AACrB;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB;;;;;;;;;;ACbA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/./src/deprecated.js","webpack://multiblocks/./src/edit.js","webpack://multiblocks/./src/index.js","webpack://multiblocks/./src/save.js","webpack://multiblocks/./src/editor.scss","webpack://multiblocks/./src/style.scss","webpack://multiblocks/../../node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multiblocks/external window \"React\"","webpack://multiblocks/external window [\"wp\",\"blockEditor\"]","webpack://multiblocks/external window [\"wp\",\"blocks\"]","webpack://multiblocks/external window [\"wp\",\"components\"]","webpack://multiblocks/external window [\"wp\",\"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 { createBlock } from \"@wordpress/blocks\";\r\nimport { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\r\nimport { useSelect } from \"@wordpress/data\";\r\n\r\nconst v1 = {\r\n\tattributes: {\r\n\t\thasCustomTitle: {\r\n\t\t\ttype: \"boolean\",\r\n\t\t\tdefault: false,\r\n\t\t},\r\n\t\tblockCustomTitle: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\tpageHeaderTitle: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\thasCta: {\r\n\t\t\ttype: \"boolean\",\r\n\t\t\tdefault: false,\r\n\t\t},\r\n\t\tcta: {\r\n\t\t\ttype: \"object\",\r\n\t\t},\r\n\t\thasCustomImage: {\r\n\t\t\ttype: \"boolean\",\r\n\t\t\tdefault: false,\r\n\t\t},\r\n\t\timageUrl: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\timageAlt: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\timageId: {\r\n\t\t\ttype: \"number\",\r\n\t\t},\r\n\t\timageProportion: {\r\n\t\t\ttype: \"string\",\r\n\t\t\tdefault: \"original\",\r\n\t\t},\r\n\t\tanchor: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\tcoverSize: {\r\n\t\t\ttype: \"string\",\r\n\t\t\tdefault: \"medium\",\r\n\t\t},\r\n\t},\r\n\r\n\tsave({ attributes }) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\r\n\tmigrate(attributes, innerBlocks) {\r\n\t\tconst { blockCustomTitle, pageHeaderTitle, ...restAttributes } = attributes;\r\n\r\n\t\t// const pageTitle = useSelect((select) => {\r\n\t\t// \tconst { getEditedPostAttribute } = select(\"core/editor\");\r\n\t\t// \treturn getEditedPostAttribute(\"title\");\r\n\t\t// });\r\n\r\n\r\n\t\treturn [\r\n\t\t\trestAttributes,\r\n\t\t\t[\r\n\t\t\t\tcreateBlock(\r\n\t\t\t\t\t\"homegrade-content-blocks/section-titling\",\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontent: attributes.sectionTitle,\r\n\t\t\t\t\t\tlevel: 3,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\tcreateBlock(\"core/heading\", {\r\n\t\t\t\t\t\t\tplaceholder: \"Titre de section\",\r\n\t\t\t\t\t\t\tcontent: attributes.hasCustomTitle ? blockCustomTitle : \"\",\r\n\t\t\t\t\t\t\tlevel: 1,\r\n\t\t\t\t\t\t\tclassName: \"section_titling__title\",\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tcreateBlock(\"core/paragraph\", {\r\n\t\t\t\t\t\t\tcontent: attributes.pageHeaderTitle,\r\n\t\t\t\t\t\t\tplaceholder: \"Tapez votre sous-titre...\",\r\n\t\t\t\t\t\t\tclassName: \"section_titling__subtitle\",\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t],\r\n\t\t\t\t),\r\n\r\n\t\t\t\t...innerBlocks,\r\n\t\t\t],\r\n\t\t];\r\n\t},\r\n};\r\n\r\nexport default [v1];\r\n","import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport { useSelect } from \"@wordpress/data\";\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tRichText,\n\tMediaReplaceFlow,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\n\nimport {\n\tPanelBody,\n\tTextControl,\n\tButton,\n\tTip,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\n\nimport { lock, trash } from \"@wordpress/icons\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\thasCustomTitle,\n\t\thasCta,\n\t\tcta,\n\t\thasCustomImage,\n\t\timageId,\n\t\timageAlt,\n\t\timageUrl,\n\t\tcoverSize,\n\t} = attributes;\n\n\tconst pageIllustration = useSelect((select) => {\n\t\tconst currentPost = select(\"core/editor\").getCurrentPost();\n\t\tif (currentPost && currentPost.acf && currentPost.acf.page_illustration) {\n\t\t\tlet Image = select(\"core\").getMedia(currentPost.acf.page_illustration);\n\t\t\treturn Image;\n\t\t}\n\t});\n\n\tfunction onChangeHasCustomTitle(newHasAutoTitle) {\n\t\tsetAttributes({ hasCustomTitle: !hasCustomTitle });\n\t\tif (newHasAutoTitle) {\n\t\t\tsetAttributes({ blockCustomTitle: undefined });\n\t\t}\n\t}\n\tfunction onChangeHasCustomImage(newHasAutoImage) {\n\t\tsetAttributes({ hasCustomImage: !hasCustomImage });\n\t\tif (!newHasAutoImage) {\n\t\t\tremoveImageAttributes();\n\t\t}\n\t}\n\tfunction setImageAttributes(image) {\n\t\tsetAttributes({\n\t\t\timageId: image.id,\n\t\t\timageAlt: image.alt,\n\t\t\timageUrl: image.url,\n\t\t});\n\t}\n\tfunction removeImageAttributes() {\n\t\tsetAttributes({\n\t\t\timageId: null,\n\t\t\timageAlt: null,\n\t\t\timageUrl: null,\n\t\t});\n\t}\n\tfunction onChangeHasCta(newHasCta) {\n\t\tsetAttributes({ hasCta: !hasCta });\n\t\tif (!newHasCta) {\n\t\t\tsetAttributes({ cta: undefined });\n\t\t}\n\t}\n\tfunction onChangeCTA(newCtaValue) {\n\t\tsetAttributes({\n\t\t\tcta: {\n\t\t\t\ttitle: !cta || !cta.title ? newCtaValue.title : cta.title,\n\t\t\t\tid: newCtaValue.id,\n\t\t\t\tkind: newCtaValue.kind,\n\t\t\t\ttype: newCtaValue.type,\n\t\t\t\turl: newCtaValue.url,\n\t\t\t},\n\t\t});\n\t}\n\tfunction onChangeTextControl(newCtaTitle) {\n\t\tsetAttributes({\n\t\t\tcta: {\n\t\t\t\t...cta,\n\t\t\t\ttitle: newCtaTitle,\n\t\t\t},\n\t\t});\n\t}\n\tfunction onCoverSizeChange(coverSize) {\n\t\tsetAttributes({ coverSize });\n\t}\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{!hasCustomTitle && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLe titre est automatiquement généré à partir du titre de la page\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{!hasCustomImage && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLa couverture est automatiquement généré à partir de\n\t\t\t\t\t\t\tl'illustration de couverture de la page.\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{hasCustomImage && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{imageUrl && {imageAlt}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{imageUrl && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\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\n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t{hasCta && (\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
\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t{cta && cta.title && cta.url && {cta.title}}\n\t\t\t\t
\n\t\t\t\t{pageIllustration && !hasCustomImage && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasCustomImage && imageUrl && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasCustomImage && !imageUrl && (\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 save from \"./save\";\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\nimport deprecated from \"./deprecated\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tforeground: \"#f03\",\n\t\tsrc: (\n\t\t\t\n\t\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\tedit: Edit,\n\tsave,\n\tdeprecated\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\r\nimport { __ } from \"@wordpress/i18n\";\r\n\r\nexport default function save({ attributes, setAttributes }) {\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst trash = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z\"\n}));\nexport default trash;\n//# sourceMappingURL=trash.js.map","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"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, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkmultiblocks\"] = globalThis[\"webpackChunkmultiblocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["createBlock","useBlockProps","RichText","InnerBlocks","useSelect","v1","attributes","hasCustomTitle","type","default","blockCustomTitle","pageHeaderTitle","hasCta","cta","hasCustomImage","imageUrl","imageAlt","imageId","imageProportion","anchor","coverSize","save","createElement","className","Content","migrate","innerBlocks","restAttributes","content","sectionTitle","level","placeholder","__","MediaReplaceFlow","InspectorControls","__experimentalLinkControl","LinkControl","MediaPlaceholder","PanelBody","TextControl","Button","Tip","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","lock","trash","Edit","setAttributes","pageIllustration","select","currentPost","getCurrentPost","acf","page_illustration","Image","getMedia","onChangeHasCustomTitle","newHasAutoTitle","undefined","onChangeHasCustomImage","newHasAutoImage","removeImageAttributes","setImageAttributes","image","id","alt","url","onChangeHasCta","newHasCta","onChangeCTA","newCtaValue","title","kind","onChangeTextControl","newCtaTitle","onCoverSizeChange","Fragment","label","checked","onChange","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","isBlock","value","class","template","allowedBlocks","href","source_url","multiple","handleUpload","registerBlockType","metadata","deprecated","foreground","xmlns","viewBox","d","edit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAgD;AAC+B;AACnC;AAE5C,MAAMK,EAAE,GAAG;EACVC,UAAU,EAAE;IACXC,cAAc,EAAE;MACfC,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDC,gBAAgB,EAAE;MACjBF,IAAI,EAAE;IACP,CAAC;IACDG,eAAe,EAAE;MAChBH,IAAI,EAAE;IACP,CAAC;IACDI,MAAM,EAAE;MACPJ,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDI,GAAG,EAAE;MACJL,IAAI,EAAE;IACP,CAAC;IACDM,cAAc,EAAE;MACfN,IAAI,EAAE,SAAS;MACfC,OAAO,EAAE;IACV,CAAC;IACDM,QAAQ,EAAE;MACTP,IAAI,EAAE;IACP,CAAC;IACDQ,QAAQ,EAAE;MACTR,IAAI,EAAE;IACP,CAAC;IACDS,OAAO,EAAE;MACRT,IAAI,EAAE;IACP,CAAC;IACDU,eAAe,EAAE;MAChBV,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE;IACV,CAAC;IACDU,MAAM,EAAE;MACPX,IAAI,EAAE;IACP,CAAC;IACDY,SAAS,EAAE;MACVZ,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAE;IACV;EACD,CAAC;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;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://multiblocks/./src/deprecated.js","webpack://multiblocks/./src/edit.js","webpack://multiblocks/./src/index.js","webpack://multiblocks/./src/save.js","webpack://multiblocks/./src/editor.scss?d446","webpack://multiblocks/./src/style.scss","webpack://multiblocks/../../node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multiblocks/external window \"React\"","webpack://multiblocks/external window [\"wp\",\"blockEditor\"]","webpack://multiblocks/external window [\"wp\",\"blocks\"]","webpack://multiblocks/external window [\"wp\",\"components\"]","webpack://multiblocks/external window [\"wp\",\"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 { createBlock } from \"@wordpress/blocks\";\r\nimport { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\r\nimport { useSelect } from \"@wordpress/data\";\r\n\r\nconst v1 = {\r\n\tattributes: {\r\n\t\thasCustomTitle: {\r\n\t\t\ttype: \"boolean\",\r\n\t\t\tdefault: false,\r\n\t\t},\r\n\t\tblockCustomTitle: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\tpageHeaderTitle: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\thasCta: {\r\n\t\t\ttype: \"boolean\",\r\n\t\t\tdefault: false,\r\n\t\t},\r\n\t\tcta: {\r\n\t\t\ttype: \"object\",\r\n\t\t},\r\n\t\thasCustomImage: {\r\n\t\t\ttype: \"boolean\",\r\n\t\t\tdefault: false,\r\n\t\t},\r\n\t\timageUrl: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\timageAlt: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\timageId: {\r\n\t\t\ttype: \"number\",\r\n\t\t},\r\n\t\timageProportion: {\r\n\t\t\ttype: \"string\",\r\n\t\t\tdefault: \"original\",\r\n\t\t},\r\n\t\tanchor: {\r\n\t\t\ttype: \"string\",\r\n\t\t},\r\n\t\tcoverSize: {\r\n\t\t\ttype: \"string\",\r\n\t\t\tdefault: \"medium\",\r\n\t\t},\r\n\t},\r\n\r\n\tsave({ attributes }) {\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t},\r\n\r\n\tmigrate(attributes, innerBlocks) {\r\n\t\tconst { blockCustomTitle, pageHeaderTitle, ...restAttributes } = attributes;\r\n\r\n\t\t// const pageTitle = useSelect((select) => {\r\n\t\t// \tconst { getEditedPostAttribute } = select(\"core/editor\");\r\n\t\t// \treturn getEditedPostAttribute(\"title\");\r\n\t\t// });\r\n\r\n\r\n\t\treturn [\r\n\t\t\trestAttributes,\r\n\t\t\t[\r\n\t\t\t\tcreateBlock(\r\n\t\t\t\t\t\"homegrade-content-blocks/section-titling\",\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontent: attributes.sectionTitle,\r\n\t\t\t\t\t\tlevel: 3,\r\n\t\t\t\t\t},\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\tcreateBlock(\"core/heading\", {\r\n\t\t\t\t\t\t\tplaceholder: \"Titre de section\",\r\n\t\t\t\t\t\t\tcontent: attributes.hasCustomTitle ? blockCustomTitle : \"\",\r\n\t\t\t\t\t\t\tlevel: 1,\r\n\t\t\t\t\t\t\tclassName: \"section_titling__title\",\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tcreateBlock(\"core/paragraph\", {\r\n\t\t\t\t\t\t\tcontent: attributes.pageHeaderTitle,\r\n\t\t\t\t\t\t\tplaceholder: \"Tapez votre sous-titre...\",\r\n\t\t\t\t\t\t\tclassName: \"section_titling__subtitle\",\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t],\r\n\t\t\t\t),\r\n\r\n\t\t\t\t...innerBlocks,\r\n\t\t\t],\r\n\t\t];\r\n\t},\r\n};\r\n\r\nexport default [v1];\r\n","import { __ } from \"@wordpress/i18n\";\nimport \"./editor.scss\";\nimport { useSelect } from \"@wordpress/data\";\nimport {\n\tInnerBlocks,\n\tuseBlockProps,\n\tRichText,\n\tMediaReplaceFlow,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\n\nimport {\n\tPanelBody,\n\tTextControl,\n\tButton,\n\tTip,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from \"@wordpress/components\";\n\nimport { lock, trash } from \"@wordpress/icons\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\thasCta,\n\t\tcta,\n\t\thasCustomImage,\n\t\timageId,\n\t\timageAlt,\n\t\timageUrl,\n\t\tcoverSize,\n\t} = attributes;\n\n\tconst pageIllustration = useSelect((select) => {\n\t\tconst currentPost = select(\"core/editor\").getCurrentPost();\n\t\tif (currentPost && currentPost.acf && currentPost.acf.page_illustration) {\n\t\t\tlet Image = select(\"core\").getMedia(currentPost.acf.page_illustration);\n\t\t\treturn Image;\n\t\t}\n\t});\n\n\tfunction onChangeHasCustomImage(newHasAutoImage) {\n\t\tsetAttributes({ hasCustomImage: !hasCustomImage });\n\t\tif (!newHasAutoImage) {\n\t\t\tremoveImageAttributes();\n\t\t}\n\t}\n\tfunction setImageAttributes(image) {\n\t\tsetAttributes({\n\t\t\timageId: image.id,\n\t\t\timageAlt: image.alt,\n\t\t\timageUrl: image.url,\n\t\t});\n\t}\n\tfunction removeImageAttributes() {\n\t\tsetAttributes({\n\t\t\timageId: null,\n\t\t\timageAlt: null,\n\t\t\timageUrl: null,\n\t\t});\n\t}\n\tfunction onChangeHasCta(newHasCta) {\n\t\tsetAttributes({ hasCta: !hasCta });\n\t\tif (!newHasCta) {\n\t\t\tsetAttributes({ cta: undefined });\n\t\t}\n\t}\n\tfunction onChangeCTA(newCtaValue) {\n\t\tsetAttributes({\n\t\t\tcta: {\n\t\t\t\ttitle: !cta || !cta.title ? newCtaValue.title : cta.title,\n\t\t\t\tid: newCtaValue.id,\n\t\t\t\tkind: newCtaValue.kind,\n\t\t\t\ttype: newCtaValue.type,\n\t\t\t\turl: newCtaValue.url,\n\t\t\t},\n\t\t});\n\t}\n\tfunction onChangeTextControl(newCtaTitle) {\n\t\tsetAttributes({\n\t\t\tcta: {\n\t\t\t\t...cta,\n\t\t\t\ttitle: newCtaTitle,\n\t\t\t},\n\t\t});\n\t}\n\tfunction onCoverSizeChange(coverSize) {\n\t\tsetAttributes({ coverSize });\n\t}\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{!hasCustomImage && (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tLa couverture est automatiquement généré à partir de\n\t\t\t\t\t\t\tl'illustration de couverture de la page.\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\t{hasCustomImage && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{imageUrl && {imageAlt}}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{imageUrl && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t)}\n\t\t\t\t\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\n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t{hasCta && (\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
\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t{cta && cta.title && cta.url && {cta.title}}\n\t\t\t\t
\n\t\t\t\t{pageIllustration && !hasCustomImage && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasCustomImage && imageUrl && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{hasCustomImage && !imageUrl && (\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 save from \"./save\";\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\nimport deprecated from \"./deprecated\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tforeground: \"#DF1E1E\",\n\t\tsrc: (\n\t\t\t\n\t\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\tedit: Edit,\n\tsave,\n\tdeprecated,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\r\nimport { __ } from \"@wordpress/i18n\";\r\n\r\nexport default function save({ attributes, setAttributes }) {\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\r\n\t);\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst trash = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z\"\n}));\nexport default trash;\n//# sourceMappingURL=trash.js.map","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"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, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkmultiblocks\"] = globalThis[\"webpackChunkmultiblocks\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["createBlock","useBlockProps","RichText","InnerBlocks","useSelect","v1","attributes","hasCustomTitle","type","default","blockCustomTitle","pageHeaderTitle","hasCta","cta","hasCustomImage","imageUrl","imageAlt","imageId","imageProportion","anchor","coverSize","save","createElement","className","Content","migrate","innerBlocks","restAttributes","content","sectionTitle","level","placeholder","__","MediaReplaceFlow","InspectorControls","__experimentalLinkControl","LinkControl","MediaPlaceholder","PanelBody","TextControl","Button","Tip","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","lock","trash","Edit","setAttributes","pageIllustration","select","currentPost","getCurrentPost","acf","page_illustration","Image","getMedia","onChangeHasCustomImage","newHasAutoImage","removeImageAttributes","setImageAttributes","image","id","alt","url","onChangeHasCta","newHasCta","undefined","onChangeCTA","newCtaValue","title","kind","onChangeTextControl","newCtaTitle","onCoverSizeChange","Fragment","label","checked","onChange","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","isBlock","value","class","template","allowedBlocks","href","source_url","multiple","handleUpload","registerBlockType","metadata","deprecated","foreground","xmlns","viewBox","d","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/content-page-header/src/block.json b/blocks/content-page-header/src/block.json index 737fd30..d8bef0b 100644 --- a/blocks/content-page-header/src/block.json +++ b/blocks/content-page-header/src/block.json @@ -17,10 +17,6 @@ "style": "file:./style-index.css", "render": "file:./render.php", "attributes": { - "hasCustomTitle": { - "type": "boolean", - "default": false - }, "pageHeaderTitle": { "type": "string" }, diff --git a/blocks/content-page-header/src/edit.js b/blocks/content-page-header/src/edit.js index d5b6eec..854793d 100644 --- a/blocks/content-page-header/src/edit.js +++ b/blocks/content-page-header/src/edit.js @@ -25,7 +25,6 @@ import { lock, trash } from "@wordpress/icons"; export default function Edit({ attributes, setAttributes }) { const { - hasCustomTitle, hasCta, cta, hasCustomImage, @@ -43,12 +42,6 @@ export default function Edit({ attributes, setAttributes }) { } }); - function onChangeHasCustomTitle(newHasAutoTitle) { - setAttributes({ hasCustomTitle: !hasCustomTitle }); - if (newHasAutoTitle) { - setAttributes({ blockCustomTitle: undefined }); - } - } function onChangeHasCustomImage(newHasAutoImage) { setAttributes({ hasCustomImage: !hasCustomImage }); if (!newHasAutoImage) { @@ -100,21 +93,6 @@ export default function Edit({ attributes, setAttributes }) { return ( <> - - - {!hasCustomTitle && ( - - Le titre est automatiquement généré à partir du titre de la page - - )} -