diff --git a/plugins/carhop-blocks/build/blocks-manifest.php b/plugins/carhop-blocks/build/blocks-manifest.php index c2afc5a..e778dfc 100644 --- a/plugins/carhop-blocks/build/blocks-manifest.php +++ b/plugins/carhop-blocks/build/blocks-manifest.php @@ -861,7 +861,13 @@ return array( 'editorScript' => 'file:./index.js', 'editorStyle' => 'file:./index.css', 'style' => 'file:./style-index.css', - 'viewScript' => 'file:./view.js' + 'viewScript' => 'file:./view.js', + 'attributes' => array( + 'hasIcon' => array( + 'type' => 'boolean', + 'default' => true + ) + ) ), 'our-collection' => array( '$schema' => 'https://schemas.wp.org/trunk/block.json', diff --git a/plugins/carhop-blocks/build/notice-panel/block.json b/plugins/carhop-blocks/build/notice-panel/block.json index ba23071..5e68524 100644 --- a/plugins/carhop-blocks/build/notice-panel/block.json +++ b/plugins/carhop-blocks/build/notice-panel/block.json @@ -15,5 +15,11 @@ "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", - "viewScript": "file:./view.js" + "viewScript": "file:./view.js", + "attributes": { + "hasIcon": { + "type": "boolean", + "default": true + } + } } \ No newline at end of file diff --git a/plugins/carhop-blocks/build/notice-panel/index.asset.php b/plugins/carhop-blocks/build/notice-panel/index.asset.php index ae14526..2353630 100644 --- a/plugins/carhop-blocks/build/notice-panel/index.asset.php +++ b/plugins/carhop-blocks/build/notice-panel/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '7aabfb46e53e3b3a191d'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '452e1bbafca80420bbd8'); diff --git a/plugins/carhop-blocks/build/notice-panel/index.js b/plugins/carhop-blocks/build/notice-panel/index.js index 7b21ac1..83a8860 100644 --- a/plugins/carhop-blocks/build/notice-panel/index.js +++ b/plugins/carhop-blocks/build/notice-panel/index.js @@ -8,7 +8,7 @@ \*************************************/ /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/notice-panel","version":"0.1.0","title":"Encart d\'information","category":"carhop-blocks","icon":"smiley","description":"Encart d\'information pour la mise en avant d\'éléments informatifs","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}'); +module.exports = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"carhop-blocks/notice-panel","version":"0.1.0","title":"Encart d\'information","category":"carhop-blocks","icon":"smiley","description":"Encart d\'information pour la mise en avant d\'éléments informatifs","example":{},"supports":{"html":false},"textdomain":"carhop-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","attributes":{"hasIcon":{"type":"boolean","default":true}}}'); /***/ }), @@ -27,8 +27,11 @@ __webpack_require__.r(__webpack_exports__); /* 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 _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./src/notice-panel/editor.scss"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); -/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); + @@ -37,25 +40,39 @@ function Edit({ attributes, setAttributes }) { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.Fragment, { - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { + const { + hasIcon + } = attributes; + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.Fragment, { + children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Icone", "carhop-blocks"), + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.CheckboxControl, { + label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Afficher une icône", "carhop-blocks"), + checked: hasIcon, + onChange: value => setAttributes({ + hasIcon: value + }) + }) + }) + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({ className: "notice-panel" }), - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", { - className: "notice-panel__content", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)("div", { + className: `notice-panel__content has-icon-${hasIcon}`, + children: [hasIcon && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { className: "icon" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("div", { + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", { className: "innerblocks", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, { + children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, { template: [["core/paragraph", { placeholder: "Ajouter ici le texte" }]] }) })] }) - }) + })] }); } @@ -132,13 +149,16 @@ __webpack_require__.r(__webpack_exports__); function save({ attributes }) { + const { + hasIcon + } = attributes; return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", { ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({ className: "notice-panel" }), children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { - className: "notice-panel__content", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", { + className: `notice-panel__content has-icon-${hasIcon}`, + children: [hasIcon && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", { className: "icon" }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", { className: "innerblocks", @@ -182,6 +202,16 @@ module.exports = window["wp"]["blocks"]; /***/ }), +/***/ "@wordpress/components": +/*!************************************!*\ + !*** external ["wp","components"] ***! + \************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["components"]; + +/***/ }), + /***/ "@wordpress/i18n": /*!******************************!*\ !*** external ["wp","i18n"] ***! diff --git a/plugins/carhop-blocks/build/notice-panel/index.js.map b/plugins/carhop-blocks/build/notice-panel/index.js.map index 9b6f16e..d6e1af3 100644 --- a/plugins/carhop-blocks/build/notice-panel/index.js.map +++ b/plugins/carhop-blocks/build/notice-panel/index.js.map @@ -1 +1 @@ -{"version":3,"file":"notice-panel/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAC0C;AACxD;AAAA;AAER,SAASU,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,oBACCP,sDAAA,CAAAI,uDAAA;IAAAI,QAAA,eACCR,sDAAA;MAAA,GACKJ,sEAAa,CAAC;QACjBa,SAAS,EAAE;MACZ,CAAC,CAAC;MAAAD,QAAA,eAEFN,uDAAA;QAAKO,SAAS,EAAC,uBAAuB;QAAAD,QAAA,gBACrCR,sDAAA;UAAKS,SAAS,EAAC;QAAM,CAAM,CAAC,eAC5BT,sDAAA;UAAKS,SAAS,EAAC,aAAa;UAAAD,QAAA,eAC3BR,sDAAA,CAACF,gEAAW;YACXY,QAAQ,EAAE,CACT,CAAC,gBAAgB,EAAE;cAAEC,WAAW,EAAE;YAAuB,CAAC,CAAC;UAC1D,CACF;QAAC,CACE,CAAC;MAAA,CACF;IAAC,CACF;EAAC,CACL,CAAC;AAEL,C;;;;;;;;;;;ACzBA;;;;;;;;;;;;;;;;;;;;ACAsD;AAChC;AAEI;AAC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;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;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,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./src/notice-panel/edit.js","webpack://carhop-blocks/./src/notice-panel/editor.scss","webpack://carhop-blocks/./src/notice-panel/index.js","webpack://carhop-blocks/./src/notice-panel/save.js","webpack://carhop-blocks/./src/notice-panel/style.scss","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\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 {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { RichText } from \"@wordpress/block-editor\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\treturn (\n\t\t\n\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
\n\t\t\t
\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// 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\"notice-panel/index\": 0,\n\t\"notice-panel/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[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\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, [\"notice-panel/style-index\"], () => (__webpack_require__(\"./src/notice-panel/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InnerBlocks","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","children","className","template","placeholder","registerBlockType","save","metadata","name","icon","src","width","height","viewBox","d","edit","Content"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"notice-panel/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAMJ;AACV;AAC4C;AAAA;AAEpD,SAASa,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAQ,CAAC,GAAGF,UAAU;EAC9B,oBACCJ,uDAAA,CAAAE,uDAAA;IAAAK,QAAA,gBACCT,sDAAA,CAACJ,sEAAiB;MAAAa,QAAA,eACjBT,sDAAA,CAACH,4DAAS;QAACa,KAAK,EAAElB,mDAAE,CAAC,OAAO,EAAE,eAAe,CAAE;QAAAiB,QAAA,eAC9CT,sDAAA,CAACF,kEAAe;UACfa,KAAK,EAAEnB,mDAAE,CAAC,oBAAoB,EAAE,eAAe,CAAE;UACjDoB,OAAO,EAAEJ,OAAQ;UACjBK,QAAQ,EAAGC,KAAK,IAAKP,aAAa,CAAC;YAAEC,OAAO,EAAEM;UAAM,CAAC;QAAE,CACvD;MAAC,CACQ;IAAC,CACM,CAAC,eACpBd,sDAAA;MAAA,GACKP,sEAAa,CAAC;QACjBsB,SAAS,EAAE;MACZ,CAAC,CAAC;MAAAN,QAAA,eAEFP,uDAAA;QAAKa,SAAS,EAAE,kCAAkCP,OAAO,EAAG;QAAAC,QAAA,GAC1DD,OAAO,iBAAIR,sDAAA;UAAKe,SAAS,EAAC;QAAM,CAAM,CAAC,eACxCf,sDAAA;UAAKe,SAAS,EAAC,aAAa;UAAAN,QAAA,eAC3BT,sDAAA,CAACL,gEAAW;YACXqB,QAAQ,EAAE,CACT,CAAC,gBAAgB,EAAE;cAAEC,WAAW,EAAE;YAAuB,CAAC,CAAC;UAC1D,CACF;QAAC,CACE,CAAC;MAAA,CACF;IAAC,CACF,CAAC;EAAA,CAC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AA+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,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;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,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./src/notice-panel/edit.js","webpack://carhop-blocks/./src/notice-panel/editor.scss","webpack://carhop-blocks/./src/notice-panel/index.js","webpack://carhop-blocks/./src/notice-panel/save.js","webpack://carhop-blocks/./src/notice-panel/style.scss","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tInnerBlocks,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nimport { PanelBody, CheckboxControl } from \"@wordpress/components\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { hasIcon } = attributes;\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t setAttributes({ hasIcon: value })}\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{hasIcon &&
}\n\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","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps } from \"@wordpress/block-editor\";\nimport { RichText } from \"@wordpress/block-editor\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { hasIcon } = attributes;\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\t{hasIcon &&
}\n\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","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// 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\"notice-panel/index\": 0,\n\t\"notice-panel/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[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\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, [\"notice-panel/style-index\"], () => (__webpack_require__(\"./src/notice-panel/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","InnerBlocks","InspectorControls","PanelBody","CheckboxControl","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","Edit","attributes","setAttributes","hasIcon","children","title","label","checked","onChange","value","className","template","placeholder","registerBlockType","save","metadata","name","icon","src","width","height","viewBox","d","edit","Content"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/subscribe-infolettre/index.js.map b/plugins/carhop-blocks/build/subscribe-infolettre/index.js.map index bce0567..3f169e1 100644 --- a/plugins/carhop-blocks/build/subscribe-infolettre/index.js.map +++ b/plugins/carhop-blocks/build/subscribe-infolettre/index.js.map @@ -1 +1 @@ -{"version":3,"file":"subscribe-infolettre/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAC0C;AACxD;AAAA;AAER,SAASQ,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAM,CAAC,GAAGF,UAAU;EAC5B,oBACCJ,sDAAA;IAAA,GACKJ,sEAAa,CAAC;MACjBW,SAAS,EAAE;IACZ,CAAC,CAAC;IAAAC,QAAA,eAEFN,uDAAA;MAAKK,SAAS,EAAC,6BAA6B;MAAAC,QAAA,gBAC3CN,uDAAA;QAAKK,SAAS,EAAC,+BA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ACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./src/subscribe-infolettre/edit.js","webpack://carhop-blocks/./src/subscribe-infolettre/editor.scss","webpack://carhop-blocks/./src/subscribe-infolettre/index.js","webpack://carhop-blocks/./src/subscribe-infolettre/save.js","webpack://carhop-blocks/./src/subscribe-infolettre/style.scss","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { useBlockProps, InnerBlocks, RichText } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { title } = attributes;\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

infolettre

\n\t\t\t\t\t setAttributes({ title: value })}\n\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\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","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save() {\n\treturn ;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// 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\"subscribe-infolettre/index\": 0,\n\t\"subscribe-infolettre/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[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\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, [\"subscribe-infolettre/style-index\"], () => (__webpack_require__(\"./src/subscribe-infolettre/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","jsx","_jsx","jsxs","_jsxs","Edit","attributes","setAttributes","title","className","children","tagName","placeholder","value","onChange","template","content","allowedBlocks","action","type","registerBlockType","save","metadata","name","icon","src","xmlns","viewBox","d","class","foreground","edit","Content"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"subscribe-infolettre/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAC0C;AACxD;AAAA;AAER,SAASQ,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,E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E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;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,4G;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://carhop-blocks/./src/subscribe-infolettre/edit.js","webpack://carhop-blocks/./src/subscribe-infolettre/editor.scss?7992","webpack://carhop-blocks/./src/subscribe-infolettre/index.js","webpack://carhop-blocks/./src/subscribe-infolettre/save.js","webpack://carhop-blocks/./src/subscribe-infolettre/style.scss?a3aa","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/chunk loaded","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/webpack/runtime/jsonp chunk loading","webpack://carhop-blocks/webpack/before-startup","webpack://carhop-blocks/webpack/startup","webpack://carhop-blocks/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { useBlockProps, InnerBlocks, RichText } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { title } = attributes;\n\treturn (\n\t\t\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t

infolettre

\n\t\t\t\t\t setAttributes({ title: value })}\n\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\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","// extracted by mini-css-extract-plugin\nexport {};","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\ticon: {\n\t\tsrc: (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#136f63\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save() {\n\treturn ;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// 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\"subscribe-infolettre/index\": 0,\n\t\"subscribe-infolettre/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[\"webpackChunkcarhop_blocks\"] = globalThis[\"webpackChunkcarhop_blocks\"] || [];\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, [\"subscribe-infolettre/style-index\"], () => (__webpack_require__(\"./src/subscribe-infolettre/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","jsx","_jsx","jsxs","_jsxs","Edit","attributes","setAttributes","title","className","children","tagName","placeholder","value","onChange","template","content","allowedBlocks","action","type","registerBlockType","save","metadata","name","icon","src","xmlns","viewBox","d","class","foreground","edit","Content"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/variations-rtl.css b/plugins/carhop-blocks/build/variations-rtl.css index 7e9cd39..96f86cd 100644 --- a/plugins/carhop-blocks/build/variations-rtl.css +++ b/plugins/carhop-blocks/build/variations-rtl.css @@ -70,3 +70,15 @@ .iconed-list-item-backend-icon-square--pendule { background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMiAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjU3ODEgMjBDMTUuODY4IDIwIDIwLjE1NjIgMTUuNzQ2NyAyMC4xNTYyIDEwLjVDMjAuMTU2MiA1LjI1MzI5IDE1Ljg2OCAxIDEwLjU3ODEgMUM1LjI4ODI3IDEgMSA1LjI1MzI5IDEgMTAuNUMxIDE1Ljc0NjcgNS4yODgyNyAyMCAxMC41NzgxIDIwWiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxwYXRoIGQ9Ik0xMC40ODA1IDQuMzgwODZWMTEuMDc5N0gxNS4wMDYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4K); } +.wp-block-column.is-style-sticky-column .sticky-column-wrapper { + position: sticky; + top: 0; +} +body.wp-admin .sticky-column-wrapper { + flex-basis: 0; + flex-grow: 1; +} +body.wp-admin .sticky-column-wrapper .block-editor-block-list__block { + position: sticky; + top: 0; +} diff --git a/plugins/carhop-blocks/build/variations.asset.php b/plugins/carhop-blocks/build/variations.asset.php index 2184a18..22f8a44 100644 --- a/plugins/carhop-blocks/build/variations.asset.php +++ b/plugins/carhop-blocks/build/variations.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '0a4c9870b88afed9dfe3'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '1f52d271b768de8e56d3'); diff --git a/plugins/carhop-blocks/build/variations.css b/plugins/carhop-blocks/build/variations.css index 72984f3..935a3ab 100644 --- a/plugins/carhop-blocks/build/variations.css +++ b/plugins/carhop-blocks/build/variations.css @@ -70,5 +70,17 @@ .iconed-list-item-backend-icon-square--pendule { background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMiAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjU3ODEgMjBDMTUuODY4IDIwIDIwLjE1NjIgMTUuNzQ2NyAyMC4xNTYyIDEwLjVDMjAuMTU2MiA1LjI1MzI5IDE1Ljg2OCAxIDEwLjU3ODEgMUM1LjI4ODI3IDEgMSA1LjI1MzI5IDEgMTAuNUMxIDE1Ljc0NjcgNS4yODgyNyAyMCAxMC41NzgxIDIwWiIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIi8+CjxwYXRoIGQ9Ik0xMC40ODA1IDQuMzgwODZWMTEuMDc5N0gxNS4wMDYiIHN0cm9rZT0id2hpdGUiIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4K); } +.wp-block-column.is-style-sticky-column .sticky-column-wrapper { + position: sticky; + top: 0; +} +body.wp-admin .sticky-column-wrapper { + flex-basis: 0; + flex-grow: 1; +} +body.wp-admin .sticky-column-wrapper .block-editor-block-list__block { + position: sticky; + top: 0; +} /*# sourceMappingURL=variations.css.map*/ \ No newline at end of file diff --git a/plugins/carhop-blocks/build/variations.css.map b/plugins/carhop-blocks/build/variations.css.map index 281f84b..7708da3 100644 --- a/plugins/carhop-blocks/build/variations.css.map +++ b/plugins/carhop-blocks/build/variations.css.map @@ -1 +1 @@ -{"version":3,"file":"variations.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;EACA;EACA;EACA;AACF;AAIE;EACC;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAQA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AALD;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF,C","sources":["webpack://carhop-blocks/./src/core-variants/variants.scss"],"sourcesContent":[".wp-block-list.is-iconed-list {\r\n\tdisplay: block;\r\n\r\n\tli.has-custom-icon {\r\n\t\tpadding-left: 48px;\r\n\t\tmargin-bottom: 20px;\r\n\t\tgap: 20px;\r\n\t\tposition: relative;\r\n\r\n\t\t// display: flex;\r\n\t\t// align-items: center;\r\n\r\n\t\t&::before {\r\n\t\t\tcontent: \" \";\r\n\t\t\t// position: static;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 0;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tpadding: 6px;\r\n\t\t\twidth: 36px;\r\n\t\t\theight: 36px;\r\n\t\t\tbackground-color: var(--wp--preset--color--primary);\r\n\t\t\tbackground-size: 20px auto;\r\n\t\t\tbackground-repeat: no-repeat;\r\n\t\t\tbackground-position: center;\r\n\t\t}\r\n\t\t&--sablier::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t\t}\r\n\t\t&--loupe::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t\t}\r\n\t\t&--cadenas::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t\t}\r\n\t\t&--check::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t\t}\r\n\t\t&--loupe-alt::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t\t}\r\n\t\t&--pendule::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.iconed-list-item-backend-icon-square {\r\n\tdisplay: inline-block;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tbackground-size: contain;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center;\r\n\tcolor: currentColor;\r\n\tfilter: invert(1);\r\n\t&--sablier {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t}\r\n\t&--loupe {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t}\r\n\t&--cadenas {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t}\r\n\t&--check {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t}\r\n\t&--loupe-alt {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t}\r\n\t&--pendule {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"variations.css","mappings":";;;AAAA;EACC;AACD;AACC;EACC;EACA;EACA;EACA;AACF;AAIE;EACC;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAKE;EACC;AAHH;AAQA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AALD;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AAMC;EACC;AAJF;AASC;EACC;EACA;AANF;AAWC;EACC;EACA;AARF;AASE;EACC;EACA;AAPH,C","sources":["webpack://carhop-blocks/./src/core-variants/variants.scss"],"sourcesContent":[".wp-block-list.is-iconed-list {\r\n\tdisplay: block;\r\n\r\n\tli.has-custom-icon {\r\n\t\tpadding-left: 48px;\r\n\t\tmargin-bottom: 20px;\r\n\t\tgap: 20px;\r\n\t\tposition: relative;\r\n\r\n\t\t// display: flex;\r\n\t\t// align-items: center;\r\n\r\n\t\t&::before {\r\n\t\t\tcontent: \" \";\r\n\t\t\t// position: static;\r\n\t\t\tposition: absolute;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 0;\r\n\t\t\tdisplay: inline-block;\r\n\t\t\tpadding: 6px;\r\n\t\t\twidth: 36px;\r\n\t\t\theight: 36px;\r\n\t\t\tbackground-color: var(--wp--preset--color--primary);\r\n\t\t\tbackground-size: 20px auto;\r\n\t\t\tbackground-repeat: no-repeat;\r\n\t\t\tbackground-position: center;\r\n\t\t}\r\n\t\t&--sablier::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t\t}\r\n\t\t&--loupe::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t\t}\r\n\t\t&--cadenas::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t\t}\r\n\t\t&--check::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t\t}\r\n\t\t&--loupe-alt::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t\t}\r\n\t\t&--pendule::before {\r\n\t\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n.iconed-list-item-backend-icon-square {\r\n\tdisplay: inline-block;\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\tbackground-size: contain;\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-position: center;\r\n\tcolor: currentColor;\r\n\tfilter: invert(1);\r\n\t&--sablier {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-sablier.svg\");\r\n\t}\r\n\t&--loupe {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe.svg\");\r\n\t}\r\n\t&--cadenas {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-cadenas.svg\");\r\n\t}\r\n\t&--check {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-check.svg\");\r\n\t}\r\n\t&--loupe-alt {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-loupe-alt.svg\");\r\n\t}\r\n\t&--pendule {\r\n\t\tbackground-image: url(\"../core-variants/core-list-variant/icons/carhop-pendule.svg\");\r\n\t}\r\n}\r\n\r\n.wp-block-column.is-style-sticky-column {\r\n\t.sticky-column-wrapper {\r\n\t\tposition: sticky;\r\n\t\ttop: 0;\r\n\t}\r\n}\r\n\r\nbody.wp-admin {\r\n\t.sticky-column-wrapper {\r\n\t\tflex-basis: 0;\r\n\t\tflex-grow: 1;\r\n\t\t.block-editor-block-list__block {\r\n\t\t\tposition: sticky;\r\n\t\t\ttop: 0;\r\n\t\t}\r\n\t}\r\n}\r\n"],"names":[],"ignoreList":[],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/build/variations.js b/plugins/carhop-blocks/build/variations.js index d675adc..e2d4cc9 100644 --- a/plugins/carhop-blocks/build/variations.js +++ b/plugins/carhop-blocks/build/variations.js @@ -14,6 +14,90 @@ wp.blocks.registerBlockStyle("core/buttons", { /***/ }), +/***/ "./src/core-variants/core-columns/editor.js": +/*!**************************************************!*\ + !*** ./src/core-variants/core-columns/editor.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "react/jsx-runtime"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__); + + + + + +// Enregistrement du style de bloc + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockStyle)("core/column", { + name: "sticky-column", + label: "Colonne sticky" +}); + +// Fonction pour vérifier si le style sticky-columns est appliqué +const hasStickyColumnStyle = attributes => { + const className = attributes?.className || ""; + return className.includes("is-style-sticky-column"); +}; + +// ----------------------------- +// 1. Modifier le HTML sauvegardé pour envelopper les colonnes dans une div avec la classe "test" +// ----------------------------- +(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__.addFilter)("blocks.getSaveElement", "carhop/sticky-columns-wrapper", (element, blockType, attributes) => { + // Vérifier si c'est le bloc core/columns et si le style sticky-columns est appliqué + if (blockType.name !== "core/column" || !hasStickyColumnStyle(attributes)) { + return element; + } + + // Si l'élément est null ou n'a pas d'enfants, retourner tel quel + if (!element || !element.props || !element.props.children) { + return element; + } + + // Envelopper les enfants dans une div avec la classe "sticky-column-wrapper" + const wrappedChildren = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.createElement)("div", { + className: "sticky-column-wrapper" + }, element.props.children); + + // Retourner l'élément avec les enfants enveloppés + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.createElement)(element.type, { + ...element.props, + children: wrappedChildren + }, wrappedChildren); +}); + +// ----------------------------- +// 2. Modifier l'affichage dans l'éditeur pour envelopper les colonnes dans une div avec la classe "test" +// ----------------------------- +(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__.addFilter)("editor.BlockEdit", "carhop/sticky-columns-editor-wrapper", (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__.createHigherOrderComponent)(BlockEdit => { + return props => { + // Vérifier si c'est le bloc core/column et si le style sticky-column est appliqué + if (props.name !== "core/column" || !hasStickyColumnStyle(props.attributes)) { + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(BlockEdit, { + ...props + }); + } + console.log(props); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.createElement)("div", { + className: "sticky-column-wrapper" + }, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(BlockEdit, { + ...props + })); + }; +}, "withStickyColumnWrapper")); + +/***/ }), + /***/ "./src/core-variants/core-embed-variant/editor.js": /*!********************************************************!*\ !*** ./src/core-variants/core-embed-variant/editor.js ***! @@ -422,7 +506,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _core_list_variant_editor_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./core-list-variant/editor.js */ "./src/core-variants/core-list-variant/editor.js"); /* harmony import */ var _core_buttons_editor_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./core-buttons/editor.js */ "./src/core-variants/core-buttons/editor.js"); /* harmony import */ var _core_buttons_editor_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_core_buttons_editor_js__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _variants_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./variants.scss */ "./src/core-variants/variants.scss"); +/* harmony import */ var _core_columns_editor_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./core-columns/editor.js */ "./src/core-variants/core-columns/editor.js"); +/* harmony import */ var _variants_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./variants.scss */ "./src/core-variants/variants.scss"); + diff --git a/plugins/carhop-blocks/build/variations.js.map b/plugins/carhop-blocks/build/variations.js.map index 59ef3cd..dadd860 100644 --- a/plugins/carhop-blocks/build/variations.js.map +++ b/plugins/carhop-blocks/build/variations.js.map @@ -1 +1 @@ -{"version":3,"file":"variations.js","mappings":";;;;;;;;;AAAAA,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,cAAc,EAAE;EAC5CC,IAAI,EAAE,aAAa;EACn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iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;;;;ACN0C;AACF;AACA;AACD;AACL","sources":["webpack://carhop-blocks/./src/core-variants/core-buttons/editor.js","webpack://carhop-blocks/./src/core-variants/core-embed-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-heading-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-image-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-list-variant/editor.js","webpack://carhop-blocks/./src/core-variants/variants.scss?f090","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"compose\"]","webpack://carhop-blocks/external window [\"wp\",\"element\"]","webpack://carhop-blocks/external window [\"wp\",\"hooks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/./src/core-variants/variants.js"],"sourcesContent":["wp.blocks.registerBlockStyle(\"core/buttons\", {\r\n\tname: \"big-buttons\",\r\n\tlabel: \"Grands boutons \",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/embed\", {\r\n\tname: \"stacked-background\",\r\n\tlabel: \"Fond empilé\",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/heading\", {\r\n\tname: \"stroked-after\",\r\n\tlabel: \"Titre + trait \",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"framed\",\r\n\tlabel: \"Encadré\",\r\n\tisDefault: true,\r\n});\r\nwp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"stacked\",\r\n\tlabel: \"Empilé\",\r\n\tisDefault: false,\r\n});\r\n","import { registerBlockVariation } from \"@wordpress/blocks\";\r\nimport { __ } from \"@wordpress/i18n\";\r\nimport {\r\n\tInspectorControls,\r\n\tBlockControls,\r\n\tAlignmentToolbar,\r\n} from \"@wordpress/block-editor\";\r\nimport { ToolbarGroup, ToolbarDropdownMenu } from \"@wordpress/components\";\r\nimport { Fragment } from \"@wordpress/element\";\r\nimport { addFilter } from \"@wordpress/hooks\";\r\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\r\n\r\nimport { check, arrowRight, starFilled } from \"@wordpress/icons\";\r\n\r\n// Variation du bloc \"Liste\" pour ajouter une classe spéciale\r\nregisterBlockVariation(\"core/list\", {\r\n\tname: \"iconed-list\",\r\n\ttitle: \"Liste avec icônes\",\r\n\tdescription: \"Liste dont chaque élément peut avoir une icône personnalisée.\",\r\n\tattributes: {\r\n\t\tclassName: \"is-iconed-list\",\r\n\t},\r\n\tscope: [\"inserter\", \"transform\"],\r\n\tisActive: (blockAttributes) => {\r\n\t\tconst cls = (blockAttributes && blockAttributes.className) || \"\";\r\n\t\treturn cls.split(\" \").includes(\"is-iconed-list\");\r\n\t},\r\n});\r\n\r\n// -----------------------------\r\n// 1. On étend les attributs de core/list-item\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"blocks.registerBlockType\",\r\n\t\"am/iconed-list-item-attributes\",\r\n\t(settings, name) => {\r\n\t\tif (name !== \"core/list-item\") {\r\n\t\t\treturn settings;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\t...settings,\r\n\t\t\tattributes: {\r\n\t\t\t\t...settings.attributes,\r\n\t\t\t\ticon: {\r\n\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\tdefault: \"\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t};\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 2. On ajoute un panneau de réglages pour choisir l'icône\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"editor.BlockEdit\",\r\n\t\"am/iconed-list-item-controls\",\r\n\t(BlockEdit) => (props) => {\r\n\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tconst { attributes, setAttributes } = props;\r\n\t\tconst { icon } = attributes;\r\n\r\n\t\tconst ICONS = [\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Loupe\"),\r\n\t\t\t\tvalue: \"loupe\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Sablier\"),\r\n\t\t\t\tvalue: \"sablier\",\r\n\t\t\t},\r\n\t\t\t{ title: __(\"Cadenas\"), value: \"cadenas\" },\r\n\t\t\t{ title: __(\"Check\"), value: \"check\" },\r\n\t\t\t{ title: __(\"Loupe Alt\"), value: \"loupe-alt\" },\r\n\t\t\t{ title: __(\"Pendule\"), value: \"pendule\" },\r\n\t\t];\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcontrols={ICONS.map(({ title, value }) => ({\r\n\t\t\t\t\t\t\t\ttitle,\r\n\t\t\t\t\t\t\t\ticon: (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t\t\tisActive: icon === value,\r\n\t\t\t\t\t\t\t\tonClick: () => setAttributes({ icon: value }),\r\n\t\t\t\t\t\t\t}))}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t setAttributes({ align: value })}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 3. On ajoute des props au HTML sauvegardé pour chaque
  • \r\n// -----------------------------\r\naddFilter(\r\n\t\"blocks.getSaveContent.extraProps\",\r\n\t\"carhop/iconed-list-item-save-props\",\r\n\t(extraProps, blockType, attributes) => {\r\n\t\tif (blockType.name !== \"core/list-item\" || !attributes.icon) {\r\n\t\t\treturn extraProps;\r\n\t\t}\r\n\r\n\t\tif (attributes.icon) {\r\n\t\t\textraProps = {\r\n\t\t\t\t...extraProps,\r\n\t\t\t\tclassName:\r\n\t\t\t\t\t(extraProps.className || \"\") +\r\n\t\t\t\t\t\" has-custom-icon has-custom-icon--\" +\r\n\t\t\t\t\tattributes.icon,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn extraProps;\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 4. Applique les mêmes classes en mode éditeur (BlockListBlock)\r\n// -----------------------------\r\naddFilter(\r\n\t\"editor.BlockListBlock\",\r\n\t\"carhop/iconed-list-item-editor-classes\",\r\n\tcreateHigherOrderComponent((BlockListBlock) => {\r\n\t\treturn (props) => {\r\n\t\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\tconst slug = props.attributes?.icon || \"\";\r\n\t\t\tconst className = [\r\n\t\t\t\tprops.className || \"\",\r\n\t\t\t\tslug ? \"has-custom-icon\" : \"\",\r\n\t\t\t\tslug ? `has-custom-icon--${slug}` : \"\",\r\n\t\t\t]\r\n\t\t\t\t.filter(Boolean)\r\n\t\t\t\t.join(\" \");\r\n\r\n\t\t\treturn ;\r\n\t\t};\r\n\t}, \"withIconedListItemEditorClasses\")\r\n);\r\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"hooks\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// 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","// 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};","import \"./core-heading-variant/editor.js\";\r\nimport \"./core-image-variant/editor.js\";\r\nimport \"./core-embed-variant/editor.js\";\r\nimport \"./core-list-variant/editor.js\";\r\nimport \"./core-buttons/editor.js\";\r\n\r\nimport \"./variants.scss\";\r\n"],"names":["wp","blocks","registerBlockStyle","name","label","isDefault","registerBlockVariation","__","InspectorControls","BlockControls","AlignmentToolbar","ToolbarGroup","ToolbarDropdownMenu","Fragment","addFilter","createHigherOrderComponent","check","arrowRight","starFilled","jsx","_jsx","jsxs","_jsxs","title","description","attributes","className","scope","isActive","blockAttributes","cls","split","includes","settings","icon","type","default","BlockEdit","props","setAttributes","ICONS","value","children","controls","map","onClick","align","onChange","extraProps","blockType","BlockListBlock","slug","filter","Boolean","join"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"variations.js","mappings":";;;;;;;;;AAAAA,EAAE,CAACC,MAAM,CAACC,kBAAkB,CAAC,cAAc,EAAE;EAC5CC,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE;AACR,CAAC,CAAC,C;;;;;;;;;;;;;;;;;;;;;;ACHqD;AACV;AAMjB;AACoC;;AAEhE;AAAA;AACAF,qEAAkB,CAAC,aAAa,EAAE;EACjCC,IAAI,EAAE,eAAe;EACrBC,KAAK,EAAE;AACR,CAAC,CAAC;;AAEF;AACA,MAAMS,oBAAoB,GAAIC,UAAU,IAAK;EAC5C,MAAMC,SAAS,GAAGD,UAAU,EAAEC,SAAS,IAAI,EAAE;EAC7C,OAAOA,SAAS,CAACC,QAAQ,CAAC,wBAAwB,CAAC;AACpD,CAAC;;AAED;AACA;AACA;AACAX,2DAAS,CACR,uBAAuB,EACvB,+BAA+B,EAC/B,CAACY,OAAO,EAAEC,SAAS,EAAEJ,UAAU,KAAK;EACnC;EACA,IAAII,SAAS,CAACf,IAAI,KAAK,aAAa,IAAI,CAACU,oBAAoB,CAACC,UAAU,CAAC,EAAE;IAC1E,OAAOG,OAAO;EACf;;EAEA;EACA,IAAI,CAACA,OAAO,IAAI,CAACA,OAAO,CAACE,KAAK,IAAI,CAACF,OAAO,CAACE,KAAK,CAACC,QAAQ,EAAE;IAC1D,OAAOH,OAAO;EACf;;EAEA;EACA,MAAMI,eAAe,GAAGf,iEAAa,CACpC,KAAK,EACL;IAAES,SAAS,EAAE;EAAwB,CAAC,EACtCE,OAAO,CAACE,KAAK,CAACC,QACf,CAAC;;EAED;EACA,OAAOd,iEAAa,CACnBW,OAAO,CAACK,IAAI,EACZ;IACC,GAAGL,OAAO,CAACE,KAAK;IAChBC,QAAQ,EAAEC;EACX,CAAC,EACDA,eACD,CAAC;AACF,CACD,CAAC;;AAED;AACA;AACA;AACAhB,2DAAS,CACR,kBAAkB,EAClB,sCAAs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;;;;;;;;;;;ACAA,6C;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,4C;;;;;;;;;;;ACAA,yC;;;;;;;;;;;ACAA,yC;;;;;;;;;;;ACAA,uC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;;;;;;;;;;;;ACN0C;AACF;AACA;AACD;AACL;AACA","sources":["webpack://carhop-blocks/./src/core-variants/core-buttons/editor.js","webpack://carhop-blocks/./src/core-variants/core-columns/editor.js","webpack://carhop-blocks/./src/core-variants/core-embed-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-heading-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-image-variant/editor.js","webpack://carhop-blocks/./src/core-variants/core-list-variant/editor.js","webpack://carhop-blocks/./src/core-variants/variants.scss?f090","webpack://carhop-blocks/external window [\"wp\",\"blockEditor\"]","webpack://carhop-blocks/external window [\"wp\",\"blocks\"]","webpack://carhop-blocks/external window [\"wp\",\"components\"]","webpack://carhop-blocks/external window [\"wp\",\"compose\"]","webpack://carhop-blocks/external window [\"wp\",\"element\"]","webpack://carhop-blocks/external window [\"wp\",\"hooks\"]","webpack://carhop-blocks/external window [\"wp\",\"i18n\"]","webpack://carhop-blocks/external window \"ReactJSXRuntime\"","webpack://carhop-blocks/webpack/bootstrap","webpack://carhop-blocks/webpack/runtime/compat get default export","webpack://carhop-blocks/webpack/runtime/define property getters","webpack://carhop-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://carhop-blocks/webpack/runtime/make namespace object","webpack://carhop-blocks/./src/core-variants/variants.js"],"sourcesContent":["wp.blocks.registerBlockStyle(\"core/buttons\", {\r\n\tname: \"big-buttons\",\r\n\tlabel: \"Grands boutons \",\r\n});\r\n","import { registerBlockStyle } from \"@wordpress/blocks\";\r\nimport { addFilter } from \"@wordpress/hooks\";\r\nimport {\r\n\tcreateElement,\r\n\tFragment,\r\n\tcloneElement,\r\n\tChildren,\r\n} from \"@wordpress/element\";\r\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\r\n\r\n// Enregistrement du style de bloc\r\nregisterBlockStyle(\"core/column\", {\r\n\tname: \"sticky-column\",\r\n\tlabel: \"Colonne sticky\",\r\n});\r\n\r\n// Fonction pour vérifier si le style sticky-columns est appliqué\r\nconst hasStickyColumnStyle = (attributes) => {\r\n\tconst className = attributes?.className || \"\";\r\n\treturn className.includes(\"is-style-sticky-column\");\r\n};\r\n\r\n// -----------------------------\r\n// 1. Modifier le HTML sauvegardé pour envelopper les colonnes dans une div avec la classe \"test\"\r\n// -----------------------------\r\naddFilter(\r\n\t\"blocks.getSaveElement\",\r\n\t\"carhop/sticky-columns-wrapper\",\r\n\t(element, blockType, attributes) => {\r\n\t\t// Vérifier si c'est le bloc core/columns et si le style sticky-columns est appliqué\r\n\t\tif (blockType.name !== \"core/column\" || !hasStickyColumnStyle(attributes)) {\r\n\t\t\treturn element;\r\n\t\t}\r\n\r\n\t\t// Si l'élément est null ou n'a pas d'enfants, retourner tel quel\r\n\t\tif (!element || !element.props || !element.props.children) {\r\n\t\t\treturn element;\r\n\t\t}\r\n\r\n\t\t// Envelopper les enfants dans une div avec la classe \"sticky-column-wrapper\"\r\n\t\tconst wrappedChildren = createElement(\r\n\t\t\t\"div\",\r\n\t\t\t{ className: \"sticky-column-wrapper\" },\r\n\t\t\telement.props.children,\r\n\t\t);\r\n\r\n\t\t// Retourner l'élément avec les enfants enveloppés\r\n\t\treturn createElement(\r\n\t\t\telement.type,\r\n\t\t\t{\r\n\t\t\t\t...element.props,\r\n\t\t\t\tchildren: wrappedChildren,\r\n\t\t\t},\r\n\t\t\twrappedChildren,\r\n\t\t);\r\n\t},\r\n);\r\n\r\n// -----------------------------\r\n// 2. Modifier l'affichage dans l'éditeur pour envelopper les colonnes dans une div avec la classe \"test\"\r\n// -----------------------------\r\naddFilter(\r\n\t\"editor.BlockEdit\",\r\n\t\"carhop/sticky-columns-editor-wrapper\",\r\n\tcreateHigherOrderComponent((BlockEdit) => {\r\n\t\treturn (props) => {\r\n\t\t\t// Vérifier si c'est le bloc core/column et si le style sticky-column est appliqué\r\n\t\t\tif (\r\n\t\t\t\tprops.name !== \"core/column\" ||\r\n\t\t\t\t!hasStickyColumnStyle(props.attributes)\r\n\t\t\t) {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\tconsole.log(props);\r\n\r\n\t\t\treturn createElement(\r\n\t\t\t\t\"div\",\r\n\t\t\t\t{ className: \"sticky-column-wrapper\" },\r\n\t\t\t\t,\r\n\t\t\t);\r\n\t\t};\r\n\t}, \"withStickyColumnWrapper\"),\r\n);\r\n","wp.blocks.registerBlockStyle(\"core/embed\", {\r\n\tname: \"stacked-background\",\r\n\tlabel: \"Fond empilé\",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/heading\", {\r\n\tname: \"stroked-after\",\r\n\tlabel: \"Titre + trait \",\r\n});\r\n","wp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"framed\",\r\n\tlabel: \"Encadré\",\r\n\tisDefault: true,\r\n});\r\nwp.blocks.registerBlockStyle(\"core/image\", {\r\n\tname: \"stacked\",\r\n\tlabel: \"Empilé\",\r\n\tisDefault: false,\r\n});\r\n","import { registerBlockVariation } from \"@wordpress/blocks\";\r\nimport { __ } from \"@wordpress/i18n\";\r\nimport {\r\n\tInspectorControls,\r\n\tBlockControls,\r\n\tAlignmentToolbar,\r\n} from \"@wordpress/block-editor\";\r\nimport { ToolbarGroup, ToolbarDropdownMenu } from \"@wordpress/components\";\r\nimport { Fragment } from \"@wordpress/element\";\r\nimport { addFilter } from \"@wordpress/hooks\";\r\nimport { createHigherOrderComponent } from \"@wordpress/compose\";\r\n\r\nimport { check, arrowRight, starFilled } from \"@wordpress/icons\";\r\n\r\n// Variation du bloc \"Liste\" pour ajouter une classe spéciale\r\nregisterBlockVariation(\"core/list\", {\r\n\tname: \"iconed-list\",\r\n\ttitle: \"Liste avec icônes\",\r\n\tdescription: \"Liste dont chaque élément peut avoir une icône personnalisée.\",\r\n\tattributes: {\r\n\t\tclassName: \"is-iconed-list\",\r\n\t},\r\n\tscope: [\"inserter\", \"transform\"],\r\n\tisActive: (blockAttributes) => {\r\n\t\tconst cls = (blockAttributes && blockAttributes.className) || \"\";\r\n\t\treturn cls.split(\" \").includes(\"is-iconed-list\");\r\n\t},\r\n});\r\n\r\n// -----------------------------\r\n// 1. On étend les attributs de core/list-item\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"blocks.registerBlockType\",\r\n\t\"am/iconed-list-item-attributes\",\r\n\t(settings, name) => {\r\n\t\tif (name !== \"core/list-item\") {\r\n\t\t\treturn settings;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\t...settings,\r\n\t\t\tattributes: {\r\n\t\t\t\t...settings.attributes,\r\n\t\t\t\ticon: {\r\n\t\t\t\t\ttype: \"string\",\r\n\t\t\t\t\tdefault: \"\",\r\n\t\t\t\t},\r\n\t\t\t},\r\n\t\t};\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 2. On ajoute un panneau de réglages pour choisir l'icône\r\n// -----------------------------\r\n\r\naddFilter(\r\n\t\"editor.BlockEdit\",\r\n\t\"am/iconed-list-item-controls\",\r\n\t(BlockEdit) => (props) => {\r\n\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tconst { attributes, setAttributes } = props;\r\n\t\tconst { icon } = attributes;\r\n\r\n\t\tconst ICONS = [\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Loupe\"),\r\n\t\t\t\tvalue: \"loupe\",\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\ttitle: __(\"Sablier\"),\r\n\t\t\t\tvalue: \"sablier\",\r\n\t\t\t},\r\n\t\t\t{ title: __(\"Cadenas\"), value: \"cadenas\" },\r\n\t\t\t{ title: __(\"Check\"), value: \"check\" },\r\n\t\t\t{ title: __(\"Loupe Alt\"), value: \"loupe-alt\" },\r\n\t\t\t{ title: __(\"Pendule\"), value: \"pendule\" },\r\n\t\t];\r\n\r\n\t\treturn (\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcontrols={ICONS.map(({ title, value }) => ({\r\n\t\t\t\t\t\t\t\ttitle,\r\n\t\t\t\t\t\t\t\ticon: (\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t),\r\n\r\n\t\t\t\t\t\t\t\tisActive: icon === value,\r\n\t\t\t\t\t\t\t\tonClick: () => setAttributes({ icon: value }),\r\n\t\t\t\t\t\t\t}))}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t\t setAttributes({ align: value })}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t);\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 3. On ajoute des props au HTML sauvegardé pour chaque
  • \r\n// -----------------------------\r\naddFilter(\r\n\t\"blocks.getSaveContent.extraProps\",\r\n\t\"carhop/iconed-list-item-save-props\",\r\n\t(extraProps, blockType, attributes) => {\r\n\t\tif (blockType.name !== \"core/list-item\" || !attributes.icon) {\r\n\t\t\treturn extraProps;\r\n\t\t}\r\n\r\n\t\tif (attributes.icon) {\r\n\t\t\textraProps = {\r\n\t\t\t\t...extraProps,\r\n\t\t\t\tclassName:\r\n\t\t\t\t\t(extraProps.className || \"\") +\r\n\t\t\t\t\t\" has-custom-icon has-custom-icon--\" +\r\n\t\t\t\t\tattributes.icon,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn extraProps;\r\n\t}\r\n);\r\n\r\n// -----------------------------\r\n// 4. Applique les mêmes classes en mode éditeur (BlockListBlock)\r\n// -----------------------------\r\naddFilter(\r\n\t\"editor.BlockListBlock\",\r\n\t\"carhop/iconed-list-item-editor-classes\",\r\n\tcreateHigherOrderComponent((BlockListBlock) => {\r\n\t\treturn (props) => {\r\n\t\t\tif (props.name !== \"core/list-item\") {\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\tconst slug = props.attributes?.icon || \"\";\r\n\t\t\tconst className = [\r\n\t\t\t\tprops.className || \"\",\r\n\t\t\t\tslug ? \"has-custom-icon\" : \"\",\r\n\t\t\t\tslug ? `has-custom-icon--${slug}` : \"\",\r\n\t\t\t]\r\n\t\t\t\t.filter(Boolean)\r\n\t\t\t\t.join(\" \");\r\n\r\n\t\t\treturn ;\r\n\t\t};\r\n\t}, \"withIconedListItemEditorClasses\")\r\n);\r\n","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"hooks\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"ReactJSXRuntime\"];","// 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","// 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};","import \"./core-heading-variant/editor.js\";\r\nimport \"./core-image-variant/editor.js\";\r\nimport \"./core-embed-variant/editor.js\";\r\nimport \"./core-list-variant/editor.js\";\r\nimport \"./core-buttons/editor.js\";\r\nimport \"./core-columns/editor.js\";\r\n\r\nimport \"./variants.scss\";\r\n"],"names":["wp","blocks","registerBlockStyle","name","label","addFilter","createElement","Fragment","cloneElement","Children","createHigherOrderComponent","jsx","_jsx","hasStickyColumnStyle","attributes","className","includes","element","blockType","props","children","wrappedChildren","type","BlockEdit","console","log","isDefault","registerBlockVariation","__","InspectorControls","BlockControls","AlignmentToolbar","ToolbarGroup","ToolbarDropdownMenu","check","arrowRight","starFilled","jsxs","_jsxs","title","description","scope","isActive","blockAttributes","cls","split","settings","icon","default","setAttributes","ICONS","value","controls","map","onClick","align","onChange","extraProps","BlockListBlock","slug","filter","Boolean","join"],"ignoreList":[],"sourceRoot":""} \ No newline at end of file