diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/blocks-manifest.php b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/blocks-manifest.php index e7b182a..45b7631 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/blocks-manifest.php +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/blocks-manifest.php @@ -20,6 +20,13 @@ return array( 'editorScript' => 'file:./index.js', 'editorStyle' => 'file:./index.css', 'style' => 'file:./style-index.css', - 'viewScript' => 'file:./view.js' + 'viewScript' => 'file:./view.js', + 'render' => 'file:./render.php', + 'attributes' => array( + 'title' => array( + 'type' => 'string', + 'default' => 'Restez connectés à l’histoire sociale' + ) + ) ) ); diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/block.json b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/block.json index 7434481..994b0a6 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/block.json +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/block.json @@ -15,5 +15,12 @@ "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", - "viewScript": "file:./view.js" + "viewScript": "file:./view.js", + "render": "file:./render.php", + "attributes": { + "title": { + "type": "string", + "default": "Restez connectés à l’histoire sociale" + } + } } \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.asset.php b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.asset.php index 5c89ad7..2b7d8aa 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.asset.php +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'f4dd64da00366e8af217'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '2706590dc5f7986977d7'); diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js index 5df2b90..2d0ced8 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/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/subscribe-infolettre","version":"0.1.0","title":"Infolettre","category":"carhop-blocks","icon":"smiley","description":"Infolettre","example":{},"supports":{"html":false},"textdomain":"subscribe-infolettre","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/subscribe-infolettre","version":"0.1.0","title":"Infolettre","category":"carhop-blocks","icon":"smiley","description":"Infolettre","example":{},"supports":{"html":false},"textdomain":"subscribe-infolettre","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js","render":"file:./render.php","attributes":{"title":{"type":"string","default":"Restez connectés à l’histoire sociale"}}}'); /***/ }), @@ -33,7 +33,13 @@ __webpack_require__.r(__webpack_exports__); -function Edit() { +function Edit({ + attributes, + setAttributes +}) { + const { + title + } = attributes; return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("section", { ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)({ className: "subscribe-infolettre" @@ -45,12 +51,25 @@ function Edit() { children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", { className: "block-title", children: "infolettre" + }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText, { + tagName: "h2", + className: "subscribe-infolettre__title", + placeholder: "Description", + value: title, + onChange: value => setAttributes({ + title: value + }) }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks, { - template: [["core/heading", { - className: "subscribe-infolettre__title", - placeholder: "Titre", - content: "Un titre précis " - }], ["core/paragraph", { + template: [ + // [ + // "core/heading", + // { + // className: "subscribe-infolettre__title", + // placeholder: "Titre", + // content: "Un titre précis ", + // }, + // ], + ["core/paragraph", { className: "subscribe-infolettre__description", placeholder: "Description", content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse augue augue, sagittis quis mauris in, consequat vehicula est. Aliquam quis nulla ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras bibendum eget lorem eget aliquet. Fusce vel consequat neque. " @@ -133,36 +152,7 @@ __webpack_require__.r(__webpack_exports__); function save() { - return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("section", { - ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.useBlockProps.save({ - className: "subscribe-infolettre" - }), - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { - className: "subscribe-infolettre__inner", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div", { - className: "subscribe-infolettre__content", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("p", { - className: "block-title", - children: "infolettre" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {})] - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div", { - className: "subscribe-infolettre__form", - children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("form", { - action: "", - children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", { - type: "text", - placeholder: "Nom" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("input", { - type: "email", - placeholder: "Adresse email" - }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("button", { - type: "submit", - children: "S'abonner" - })] - }) - })] - }) - }); + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_0__.InnerBlocks.Content, {}); } /***/ }), diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js.map b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js.map index a77ec8d..1c0a8a4 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js.map +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/index.js.map @@ -1 +1 @@ -{"version":3,"file":"subscribe-infolettre/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACgC;AAC9C;AAAA;AAER,SAASO,IAAIA,CAAA,EAAG;EAC9B,oBACCH,sDAAA;IAAA,GACKH,sEAAa,CAAC;MACjBO,SAAS,EAAE;IACZ,CAAC,CAAC;IAAAC,QAAA,eAEFH,uDAAA;MAAKE,SAAS,EAAC,6BAA6B;MAAAC,QAAA,gBAC3CH,uDAAA;QAAKE,SAAS,EAAC,+BAA+B;QAAAC,QAAA,gBAC7CL,sDAAA;UAAGI,SAAS,EAAC,aAAa;UA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D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://subscribe-infolettre/./src/subscribe-infolettre/edit.js","webpack://subscribe-infolettre/./src/subscribe-infolettre/editor.scss?720d","webpack://subscribe-infolettre/./src/subscribe-infolettre/index.js","webpack://subscribe-infolettre/./src/subscribe-infolettre/save.js","webpack://subscribe-infolettre/./src/subscribe-infolettre/style.scss?c66a","webpack://subscribe-infolettre/external window [\"wp\",\"blockEditor\"]","webpack://subscribe-infolettre/external window [\"wp\",\"blocks\"]","webpack://subscribe-infolettre/external window [\"wp\",\"i18n\"]","webpack://subscribe-infolettre/external window \"ReactJSXRuntime\"","webpack://subscribe-infolettre/webpack/bootstrap","webpack://subscribe-infolettre/webpack/runtime/chunk loaded","webpack://subscribe-infolettre/webpack/runtime/compat get default export","webpack://subscribe-infolettre/webpack/runtime/define property getters","webpack://subscribe-infolettre/webpack/runtime/hasOwnProperty shorthand","webpack://subscribe-infolettre/webpack/runtime/make namespace object","webpack://subscribe-infolettre/webpack/runtime/jsonp chunk loading","webpack://subscribe-infolettre/webpack/before-startup","webpack://subscribe-infolettre/webpack/startup","webpack://subscribe-infolettre/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { useBlockProps, InnerBlocks } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\n\nexport default function Edit() {\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\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\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save() {\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\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 {};","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[\"webpackChunksubscribe_infolettre\"] = globalThis[\"webpackChunksubscribe_infolettre\"] || [];\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","jsx","_jsx","jsxs","_jsxs","Edit","className","children","template","placeholder","content","allowedBlocks","action","type","registerBlockType","save","metadata","name","edit","Content"],"source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;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://subscribe-infolettre/./src/subscribe-infolettre/edit.js","webpack://subscribe-infolettre/./src/subscribe-infolettre/editor.scss","webpack://subscribe-infolettre/./src/subscribe-infolettre/index.js","webpack://subscribe-infolettre/./src/subscribe-infolettre/save.js","webpack://subscribe-infolettre/./src/subscribe-infolettre/style.scss","webpack://subscribe-infolettre/external window [\"wp\",\"blockEditor\"]","webpack://subscribe-infolettre/external window [\"wp\",\"blocks\"]","webpack://subscribe-infolettre/external window [\"wp\",\"i18n\"]","webpack://subscribe-infolettre/external window \"ReactJSXRuntime\"","webpack://subscribe-infolettre/webpack/bootstrap","webpack://subscribe-infolettre/webpack/runtime/chunk loaded","webpack://subscribe-infolettre/webpack/runtime/compat get default export","webpack://subscribe-infolettre/webpack/runtime/define property getters","webpack://subscribe-infolettre/webpack/runtime/hasOwnProperty shorthand","webpack://subscribe-infolettre/webpack/runtime/make namespace object","webpack://subscribe-infolettre/webpack/runtime/jsonp chunk loading","webpack://subscribe-infolettre/webpack/before-startup","webpack://subscribe-infolettre/webpack/startup","webpack://subscribe-infolettre/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\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[\"webpackChunksubscribe_infolettre\"] = globalThis[\"webpackChunksubscribe_infolettre\"] || [];\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","edit","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/render.php b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/render.php new file mode 100644 index 0000000..f0849b2 --- /dev/null +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/render.php @@ -0,0 +1,24 @@ + 'subscribe-infolettre']); +$title = $attributes['title'] ?? null; +?> + +
> + +
\ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/view.js.map b/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/view.js.map deleted file mode 100644 index c48894b..0000000 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/build/subscribe-infolettre/view.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subscribe-infolettre/view.js","mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACAA,OAAO,CAACC,GAAG,CAAE,6DAA8D,CAAC;AAC5E,8B","sources":["webpack://subscribe-infolettre/./src/subscribe-infolettre/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n *\n * When this file is defined as the value of the `viewScript` property\n * in `block.json` it will be enqueued on the front end of the site.\n *\n * Example:\n *\n * ```js\n * {\n * \"viewScript\": \"file:./view.js\"\n * }\n * ```\n *\n * If you're not making any changes to this file because your project doesn't need any\n * JavaScript running in the front-end, then you should delete this file and remove\n * the `viewScript` property from `block.json`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\n */\n\n/* eslint-disable no-console */\nconsole.log( 'Hello World! (from create-block-subscribe-infolettre block)' );\n/* eslint-enable no-console */\n"],"names":["console","log"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/block.json b/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/block.json index 5a176fd..dd5474e 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/block.json +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/block.json @@ -15,5 +15,12 @@ "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", - "viewScript": "file:./view.js" + "viewScript": "file:./view.js", + "render": "file:./render.php", + "attributes": { + "title": { + "type": "string", + "default": "Restez connectés à l’histoire sociale" + } + } } \ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/edit.js b/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/edit.js index 4cdc68e..868288b 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/edit.js +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/edit.js @@ -1,8 +1,9 @@ import { __ } from "@wordpress/i18n"; -import { useBlockProps, InnerBlocks } from "@wordpress/block-editor"; +import { useBlockProps, InnerBlocks, RichText } from "@wordpress/block-editor"; import "./editor.scss"; -export default function Edit() { +export default function Edit({ attributes, setAttributes }) { + const { title } = attributes; return (

infolettre

+ setAttributes({ title: value })} + /> 'subscribe-infolettre']); +$title = $attributes['title'] ?? null; +?> + +
> + +
\ No newline at end of file diff --git a/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/save.js b/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/save.js index de00476..3cd111c 100644 --- a/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/save.js +++ b/plugins/carhop-blocks/blocks/subscribe-infolettre/src/subscribe-infolettre/save.js @@ -1,26 +1,5 @@ -import { useBlockProps, InnerBlocks } from "@wordpress/block-editor"; +import { InnerBlocks } from "@wordpress/block-editor"; export default function save() { - return ( -
-
-
-

infolettre

- -
- -
-
- - - -
-
-
-
- ); + return ; }