diff --git a/blocks/content-page-header/build/index.asset.php b/blocks/content-page-header/build/index.asset.php index 646cef4..914493e 100644 --- a/blocks/content-page-header/build/index.asset.php +++ b/blocks/content-page-header/build/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'c8f77197092a8ae44639'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'fb46f6506f140d571d0c'); diff --git a/blocks/content-page-header/build/index.css b/blocks/content-page-header/build/index.css index e7f4c80..b18536c 100644 --- a/blocks/content-page-header/build/index.css +++ b/blocks/content-page-header/build/index.css @@ -4,6 +4,12 @@ .block-content-page-header__page-icon { max-width: 200px !important; } +.block-content-page-header p { + display: block !important; +} +.block-content-page-header p[role=textbox] { + opacity: 0.5; +} .homegrade-blocks-content-page-header .block-editor-media-placeholder { max-height: 200px; diff --git a/blocks/content-page-header/build/index.css.map b/blocks/content-page-header/build/index.css.map index aa4bafb..c0d5c5d 100644 --- a/blocks/content-page-header/build/index.css.map +++ b/blocks/content-page-header/build/index.css.map @@ -1 +1 @@ -{"version":3,"file":"index.css","mappings":";;;AACC;EACC;AAAF;;AAIC;EACC;AADF;;AAKC;EACC;AAFF;AAIC;EACC;AAFF,C","sources":["webpack://multiblocks/./src/editor.scss"],"sourcesContent":[".block-content-page-header {\r\n\t&__page-icon {\r\n\t\tmax-width: 200px !important;\r\n\t}\r\n}\r\n.homegrade-blocks-content-page-header {\r\n\t.block-editor-media-placeholder {\r\n\t\tmax-height: 200px;\r\n\t}\r\n}\r\n.homegrade-blocks-content-page-header__panel-cta {\r\n\t.block-editor-link-control__field {\r\n\t\tmargin: 0;\r\n\t}\r\n\t.block-editor-link-control {\r\n\t\tmin-width: unset;\r\n\t}\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.css","mappings":";;;AACC;EACC;AAAF;AAEC;EACC;AAAF;AAEC;EACC;AAAF;;AAIC;EACC;AADF;;AAMC;EACC;AAHF;AAKC;EACC;AAHF,C","sources":["webpack://multiblocks/./src/editor.scss"],"sourcesContent":[".block-content-page-header {\r\n\t&__page-icon {\r\n\t\tmax-width: 200px !important;\r\n\t}\r\n\tp {\r\n\t\tdisplay: block !important;\r\n\t}\r\n\tp[role=\"textbox\"] {\r\n\t\topacity: 0.5;\r\n\t}\r\n}\r\n.homegrade-blocks-content-page-header {\r\n\t.block-editor-media-placeholder {\r\n\t\tmax-height: 200px;\r\n\t}\r\n}\r\n\r\n.homegrade-blocks-content-page-header__panel-cta {\r\n\t.block-editor-link-control__field {\r\n\t\tmargin: 0;\r\n\t}\r\n\t.block-editor-link-control {\r\n\t\tmin-width: unset;\r\n\t}\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/content-page-header/build/index.js b/blocks/content-page-header/build/index.js index 48bb921..c9cdd96 100644 --- a/blocks/content-page-header/build/index.js +++ b/blocks/content-page-header/build/index.js @@ -213,6 +213,11 @@ function Edit({ value: pageHeaderDescription, onChange: onChangeDescription // style={{ textAlign: props.attributes.alignment }} + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks, { + template: [["core/paragraph", { + placeholder: "Ajouter ici le texte" + }]], + allowedBlocks: ["core/paragraph", "core/list", "core/button", "core/buttons", "gravityforms/form", "homegrade-content-blocks/section-titling"] }), cta && cta.title && cta.url && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: cta.url }, cta.title)), pageIcon && !hasCustomImage && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { @@ -246,14 +251,16 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ "./src/style.scss"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/edit.js"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/block.json"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/save.js"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./edit */ "./src/edit.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/block.json"); -(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_4__.name, { + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_5__.name, { icon: { foreground: "#f03", src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { @@ -269,11 +276,42 @@ __webpack_require__.r(__webpack_exports__); d: "m378.98,212.46h22.87v-23.16h-22.87v23.16Zm22.88-70.39h-22.8v23.02h22.8v-23.02ZM23.05,284.21H0v22.98h23.05v-22.98Zm0-47.48H.15v22.93h22.9v-22.93ZM.24,354.72h22.81v-23.23H.24v23.23Zm378.76-.18h22.87v-23.18h-22.87v23.18ZM154.05,70.49h188.68v-23.24h-188.68v23.24Zm-94.63.01h46.52v-23.11h-46.52v23.11Zm342.51,213.59h-22.82v23.14h22.82v-23.14Zm.01-284.09H.21v117.71h401.72V0Zm-23.3,92.03c0,.48-.2.95-.45,2.04H23.8c-.16-1.47-.4-2.75-.41-4.02-.02-20.67.06-41.33-.09-62-.03-3.65.91-4.87,4.73-4.87,115.33.09,230.65.08,345.98.05,2.73,0,4.77-.03,4.74,3.8-.15,21.66-.09,43.33-.12,65Zm-236.39,309.65h22.86v-22.83h-22.86v22.83Zm141.95.17h23.06v-22.89h-23.06v22.89Zm-47.24,0h22.85v-22.82h-22.85v22.82Zm94.54.02h23.11v-22.87h-23.11v22.87Zm47.48-22.9v22.78h22.96v-22.78h-22.96Zm22.79-142.11h-22.81v22.91h22.81v-22.91ZM.14,401.73h22.91v-22.88H.14v22.88Zm.07-189.19h22.87v-23.16H.21v23.16Zm-.07-47.59h23.05v-22.76H.15v22.76Zm94.7,236.76h22.98v-22.86h-22.98v22.86Zm94.53,0h23.24v-22.8h-23.24v22.8Zm-141.94.21h23.12v-23.03h-23.12v23.03Z" }))) }, - edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"] + edit: _edit__WEBPACK_IMPORTED_MODULE_4__["default"], + save: _save__WEBPACK_IMPORTED_MODULE_3__["default"] }); /***/ }), +/***/ "./src/save.js": +/*!*********************!*\ + !*** ./src/save.js ***! + \*********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ save) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); + + + +function save({ + attributes, + setAttributes +}) { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "innerblocks" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null)); +} + +/***/ }), + /***/ "./src/editor.scss": /*!*************************!*\ !*** ./src/editor.scss ***! diff --git a/blocks/content-page-header/build/index.js.map b/blocks/content-page-header/build/index.js.map index a1a64cd..296bba4 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AACqB;AASX;AAQF;AACU;AAE1B,SAASgB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IACLC,gBAAgB;IAChBC,cAAc;IACdC,eAAe;IACfC,qBAAqB;IACrBC,MAAM;IACNC,GAAG;IACHC,cAAc;IACdC,OAAO;IACPC,QAAQ;IACRC;EACD,CAAC,GAAGX,UAAU;EAEd,MAAMY,SAAS,GAAG5B,0DAAS,CAAE6B,MAAM,IAAK;IACvC,MAAM;MAAEC;IAAuB,CAAC,GAAGD,MAAM,CAAC,aAAa,CAAC;IACxD,OAAOC,sBAAsB,CAAC,OAAO,CAAC;EACvC,CAAC,CAAC;EAEF,MAAMC,QAAQ,GAAG/B,0DAAS,CAAE6B,MAAM,IAAK;IACtC,MAAMG,WAAW,GAAGH,MAAM,CAAC,aAAa,CAAC,CAACI,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EAAE9E,6CAAIA;AACX,CAAC,CAAC;;;;;;;;;;;AC3BF;;;;;;;;;;;;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/editor.scss?0339","webpack://multiblocks/./src/style.scss","webpack://multiblocks/../../node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multiblocks/external window [\"wp\",\"blockEditor\"]","webpack://multiblocks/external window [\"wp\",\"blocks\"]","webpack://multiblocks/external window [\"wp\",\"components\"]","webpack://multiblocks/external window [\"wp\",\"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 { useSelect } from \"@wordpress/data\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tMediaReplaceFlow,\n\tInspectorControls,\n\t__experimentalLinkControl as LinkControl,\n\tMediaPlaceholder,\n} from \"@wordpress/block-editor\";\n\nimport {\n\tPanelBody,\n\tTextControl,\n\tToggleControl,\n\tButton,\n\tTip,\n} from \"@wordpress/components\";\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\tblockCustomTitle,\n\t\thasCustomTitle,\n\t\tpageHeaderTitle,\n\t\tpageHeaderDescription,\n\t\thasCta,\n\t\tcta,\n\t\thasCustomImage,\n\t\timageId,\n\t\timageAlt,\n\t\timageUrl,\n\t} = attributes;\n\n\tconst pageTitle = useSelect((select) => {\n\t\tconst { getEditedPostAttribute } = select(\"core/editor\");\n\t\treturn getEditedPostAttribute(\"title\");\n\t});\n\n\tconst pageIcon = useSelect((select) => {\n\t\tconst currentPost = select(\"core/editor\").getCurrentPost();\n\t\tif (currentPost && currentPost.acf && currentPost.acf.page_icon) {\n\t\t\tlet Image = select(\"core\").getMedia(currentPost.acf.page_icon);\n\t\t\treturn Image;\n\t\t}\n\t});\n\n\tfunction onChangeBlockCustomTitle(blockCustomTitle) {\n\t\tsetAttributes({ blockCustomTitle });\n\t}\n\tfunction onChangeTitle(newTitle) {\n\t\tsetAttributes({ pageHeaderTitle: newTitle });\n\t}\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 onChangeDescription(newDescription) {\n\t\tsetAttributes({ pageHeaderDescription: newDescription });\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\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 l'icone de la\n\t\t\t\t\t\t\tpage\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\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\t{!hasCustomTitle && (\n\t\t\t\t\t\t\t

{pageTitle}

\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{hasCustomTitle && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\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{cta && cta.title && cta.url && {cta.title}}\n\t\t\t\t
\n\t\t\t\t{pageIcon && !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\";\n\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\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});\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\"][\"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":["__","useSelect","useBlockProps","RichText","BlockControls","MediaReplaceFlow","InspectorControls","__experimentalLinkControl","LinkControl","MediaPlaceholder","PanelBody","TextControl","ToggleControl","Button","Tip","trash","Edit","attributes","setAttributes","blockCustomTitle","hasCustomTitle","pageHeaderTitle","pageHeaderDescription","hasCta","cta","hasCustomImage","imageId","imageAlt","imageUrl","pageTitle","select","getEditedPostAttribute","pageIcon","currentPost","getCurrentPost","acf","page_icon","Image","getMedia","onChangeBlockCustomTitle","onChangeTitle","newTitle","onChangeHasCustomTitle","newHasAutoTitle","undefined","onChangeHasCustomImage","newHasAutoImage","removeImageAttributes","setImageAttributes","image","id","alt","url","onChangeHasCta","newHasCta","onChangeDescription","newDescription","onChangeCTA","newCtaValue","title","kind","type","onChangeTextControl","newCtaTitle","createElement","Fragment","className","label","checked","onChange","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","value","class","tagName","placeholder","href","source_url","multiple","handleUpload","registerBlockType","metadata","foreground","xmlns","viewBox","d","edit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACd;AACqB;AASX;AAQF;AAEU;AAE1B,SAASgB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3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;;;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/editor.scss?0339","webpack://multiblocks/./src/style.scss","webpack://multiblocks/../../node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multiblocks/external window [\"wp\",\"blockEditor\"]","webpack://multiblocks/external window [\"wp\",\"blocks\"]","webpack://multiblocks/external window [\"wp\",\"components\"]","webpack://multiblocks/external window [\"wp\",\"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 { 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\tToggleControl,\n\tButton,\n\tTip,\n} from \"@wordpress/components\";\n\nimport { trash } from \"@wordpress/icons\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\tblockCustomTitle,\n\t\thasCustomTitle,\n\t\tpageHeaderTitle,\n\t\tpageHeaderDescription,\n\t\thasCta,\n\t\tcta,\n\t\thasCustomImage,\n\t\timageId,\n\t\timageAlt,\n\t\timageUrl,\n\t} = attributes;\n\n\tconst pageTitle = useSelect((select) => {\n\t\tconst { getEditedPostAttribute } = select(\"core/editor\");\n\t\treturn getEditedPostAttribute(\"title\");\n\t});\n\n\tconst pageIcon = useSelect((select) => {\n\t\tconst currentPost = select(\"core/editor\").getCurrentPost();\n\t\tif (currentPost && currentPost.acf && currentPost.acf.page_icon) {\n\t\t\tlet Image = select(\"core\").getMedia(currentPost.acf.page_icon);\n\t\t\treturn Image;\n\t\t}\n\t});\n\n\tfunction onChangeBlockCustomTitle(blockCustomTitle) {\n\t\tsetAttributes({ blockCustomTitle });\n\t}\n\tfunction onChangeTitle(newTitle) {\n\t\tsetAttributes({ pageHeaderTitle: newTitle });\n\t}\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 onChangeDescription(newDescription) {\n\t\tsetAttributes({ pageHeaderDescription: newDescription });\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\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 l'icone de la\n\t\t\t\t\t\t\tpage\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\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\t{!hasCustomTitle && (\n\t\t\t\t\t\t\t

{pageTitle}

\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{hasCustomTitle && (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t)}\n\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\n\t\t\t\t\t{cta && cta.title && cta.url && {cta.title}}\n\t\t\t\t
\n\t\t\t\t{pageIcon && !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\";\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});\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[\"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":["__","useSelect","InnerBlocks","useBlockProps","RichText","MediaReplaceFlow","InspectorControls","__experimentalLinkControl","LinkControl","MediaPlaceholder","PanelBody","TextControl","ToggleControl","Button","Tip","trash","Edit","attributes","setAttributes","blockCustomTitle","hasCustomTitle","pageHeaderTitle","pageHeaderDescription","hasCta","cta","hasCustomImage","imageId","imageAlt","imageUrl","pageTitle","select","getEditedPostAttribute","pageIcon","currentPost","getCurrentPost","acf","page_icon","Image","getMedia","onChangeBlockCustomTitle","onChangeTitle","newTitle","onChangeHasCustomTitle","newHasAutoTitle","undefined","onChangeHasCustomImage","newHasAutoImage","removeImageAttributes","setImageAttributes","image","id","alt","url","onChangeHasCta","newHasCta","onChangeDescription","newDescription","onChangeCTA","newCtaValue","title","kind","type","onChangeTextControl","newCtaTitle","createElement","Fragment","className","label","checked","onChange","src","mediaId","mediaUrl","allowedTypes","accept","onSelect","name","variant","icon","onClick","value","class","tagName","placeholder","template","allowedBlocks","href","source_url","multiple","handleUpload","registerBlockType","save","metadata","foreground","xmlns","viewBox","d","edit","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/content-page-header/build/render.php b/blocks/content-page-header/build/render.php index 52e686f..086f04c 100644 --- a/blocks/content-page-header/build/render.php +++ b/blocks/content-page-header/build/render.php @@ -25,6 +25,7 @@ $customTitle = $attributes['blockCustomTitle'] ?? null;

+ diff --git a/blocks/content-page-header/build/style-index.css b/blocks/content-page-header/build/style-index.css index 2488c9e..fa7a529 100644 --- a/blocks/content-page-header/build/style-index.css +++ b/blocks/content-page-header/build/style-index.css @@ -1,4 +1,11 @@ /*!***************************************************************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***! \***************************************************************************************************************************************************************************************************************************************/ +.block-content-page-header p { + display: none; +} +.block-content-page-header .innerblocks p { + display: block; +} +/*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file diff --git a/blocks/content-page-header/build/style-index.css.map b/blocks/content-page-header/build/style-index.css.map new file mode 100644 index 0000000..e1693e0 --- /dev/null +++ b/blocks/content-page-header/build/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"./style-index.css","mappings":";;;AAEC;EACC;AADF;AAGC;EACC;AADF,C","sources":["webpack://multiblocks/./src/style.scss"],"sourcesContent":["// Styled by the theme\r\n.block-content-page-header {\r\n\tp {\r\n\t\tdisplay: none;\r\n\t}\r\n\t.innerblocks p {\r\n\t\tdisplay: block;\r\n\t}\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/content-page-header/src/edit.js b/blocks/content-page-header/src/edit.js index 22a6ecd..ee47672 100644 --- a/blocks/content-page-header/src/edit.js +++ b/blocks/content-page-header/src/edit.js @@ -2,9 +2,9 @@ import { __ } from "@wordpress/i18n"; import "./editor.scss"; import { useSelect } from "@wordpress/data"; import { + InnerBlocks, useBlockProps, RichText, - BlockControls, MediaReplaceFlow, InspectorControls, __experimentalLinkControl as LinkControl, @@ -18,6 +18,7 @@ import { Button, Tip, } from "@wordpress/components"; + import { trash } from "@wordpress/icons"; export default function Edit({ attributes, setAttributes }) { @@ -248,6 +249,19 @@ export default function Edit({ attributes, setAttributes }) { onChange={onChangeDescription} // style={{ textAlign: props.attributes.alignment }} /> + {cta && cta.title && cta.url && {cta.title}} {pageIcon && !hasCustomImage && ( diff --git a/blocks/content-page-header/src/editor.scss b/blocks/content-page-header/src/editor.scss index d47121e..3e3f3e7 100644 --- a/blocks/content-page-header/src/editor.scss +++ b/blocks/content-page-header/src/editor.scss @@ -2,12 +2,19 @@ &__page-icon { max-width: 200px !important; } + p { + display: block !important; + } + p[role="textbox"] { + opacity: 0.5; + } } .homegrade-blocks-content-page-header { .block-editor-media-placeholder { max-height: 200px; } } + .homegrade-blocks-content-page-header__panel-cta { .block-editor-link-control__field { margin: 0; diff --git a/blocks/content-page-header/src/index.js b/blocks/content-page-header/src/index.js index c433f0b..cb2759f 100644 --- a/blocks/content-page-header/src/index.js +++ b/blocks/content-page-header/src/index.js @@ -1,6 +1,6 @@ import { registerBlockType } from "@wordpress/blocks"; import "./style.scss"; - +import save from "./save"; import Edit from "./edit"; import metadata from "./block.json"; @@ -25,4 +25,5 @@ registerBlockType(metadata.name, { ), }, edit: Edit, + save, }); diff --git a/blocks/content-page-header/src/render.php b/blocks/content-page-header/src/render.php index 52e686f..086f04c 100644 --- a/blocks/content-page-header/src/render.php +++ b/blocks/content-page-header/src/render.php @@ -25,6 +25,7 @@ $customTitle = $attributes['blockCustomTitle'] ?? null;

+ diff --git a/blocks/content-page-header/src/save.js b/blocks/content-page-header/src/save.js index e69de29..ea7c9c3 100644 --- a/blocks/content-page-header/src/save.js +++ b/blocks/content-page-header/src/save.js @@ -0,0 +1,10 @@ +import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; +import { __ } from "@wordpress/i18n"; + +export default function save({ attributes, setAttributes }) { + return ( +
+ +
+ ); +} diff --git a/blocks/content-page-header/src/style.scss b/blocks/content-page-header/src/style.scss index 381f978..3575777 100644 --- a/blocks/content-page-header/src/style.scss +++ b/blocks/content-page-header/src/style.scss @@ -1 +1,9 @@ // Styled by the theme +.block-content-page-header { + p { + display: none; + } + .innerblocks p { + display: block; + } +}