From 9a341f50bcf1a72135143ffd6f02bc7de6910d64 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Thu, 3 Aug 2023 10:32:29 +0200 Subject: [PATCH] Handling title block --- build/{blocka => __blocka}/block.json | 0 build/__blocka/index.asset.php | 1 + build/{blocka => __blocka}/index.css | 6 +- build/__blocka/index.css.map | 1 + build/{blocka => __blocka}/index.js | 64 +- build/__blocka/index.js.map | 1 + build/{blocka => __blocka}/style-index.css | 6 +- build/__blocka/style-index.css.map | 1 + .../block.json | 0 .../index.asset.php | 2 +- .../index.css | 6 +- build/__dynamic-posts/index.css.map | 1 + .../index.js | 54 +- build/__dynamic-posts/index.js.map | 1 + .../render.php | 0 .../style-index.css | 6 +- build/__dynamic-posts/style-index.css.map | 1 + .../block.json | 6 +- build/__nested-parent/index.asset.php | 1 + .../index.css | 12 +- build/__nested-parent/index.css.map | 1 + .../index.js | 128 ++-- build/__nested-parent/index.js.map | 1 + .../nested-children/block.json | 30 + .../nested-children/index.asset.php | 1 + .../__nested-parent/nested-children/index.css | 13 + .../nested-children/index.css.map | 1 + .../__nested-parent/nested-children/index.js | 351 ++++++++++ .../nested-children/index.js.map | 1 + .../style-index.css | 12 +- build/__nested-parent/style-index.css.map | 1 + build/blocka/index.asset.php | 1 - build/blocka/index.css.map | 1 - build/blocka/index.js.map | 1 - build/blocka/style-index.css.map | 1 - build/chapter-header/block.json | 6 +- build/chapter-header/index.asset.php | 2 +- build/chapter-header/index.js | 16 +- build/chapter-header/index.js.map | 2 +- build/chapter-header/render.php | 56 +- build/chapter-header/style-index.css | 1 + build/chapter-header/style-index.css.map | 2 +- build/content-heading/block.json | 24 + build/content-heading/index.asset.php | 1 + build/content-heading/index.css | 10 + build/content-heading/index.css.map | 1 + build/content-heading/index.js | 380 +++++++++++ build/content-heading/index.js.map | 1 + build/content-heading/style-index.css | 61 ++ build/content-heading/style-index.css.map | 1 + build/dynamic-posts/index.css.map | 1 - build/dynamic-posts/index.js.map | 1 - build/dynamic-posts/style-index.css.map | 1 - build/images/icon_feather_key.26c1f367.png | Bin 0 -> 8389 bytes build/nested-parent/index.asset.php | 1 - build/nested-parent/index.css.map | 1 - build/nested-parent/index.js.map | 1 - .../nested-children/index.asset.php | 1 - .../nested-children/index.css.map | 1 - .../nested-children/index.js.map | 1 - build/nested-parent/style-index.css.map | 1 - build/points-cles/block.json | 27 + build/points-cles/index.asset.php | 1 + build/points-cles/index.css | 37 ++ build/points-cles/index.css.map | 1 + build/points-cles/index.js | 610 ++++++++++++++++++ build/points-cles/index.js.map | 1 + .../nested-children/block.json | 0 .../nested-children/index.asset.php | 1 + .../nested-children/index.css | 6 +- .../points-cles/nested-children/index.css.map | 1 + .../nested-children/index.js | 64 +- .../points-cles/nested-children/index.js.map | 1 + build/points-cles/render.php | 22 + build/points-cles/style-index.css | 59 ++ build/points-cles/style-index.css.map | 1 + build/questions-container-auto/block.json | 31 + .../questions-container-auto/index.asset.php | 1 + build/questions-container-auto/index.css | 13 + build/questions-container-auto/index.css.map | 1 + build/questions-container-auto/index.js | 402 ++++++++++++ build/questions-container-auto/index.js.map | 1 + build/questions-container-auto/render.php | 27 + .../questions-container-auto/style-index.css | 17 + .../style-index.css.map | 1 + build/questions-container/block.json | 15 +- build/questions-container/index.asset.php | 2 +- build/questions-container/index.js | 160 +++-- build/questions-container/index.js.map | 2 +- build/questions-container/render.php | 15 +- build/questions-container/style-index.css | 6 +- build/questions-container/style-index.css.map | 2 +- build/wpblock-citation/block.json | 4 +- build/wpblock-citation/index.asset.php | 2 +- build/wpblock-citation/index.js | 5 +- build/wpblock-citation/index.js.map | 2 +- build/wpblock-cover/block.json | 4 +- build/wpblock-cover/index.asset.php | 2 +- build/wpblock-cover/index.js | 2 +- homegrade-content-blocks.php | 77 ++- package-lock.json | 22 +- package.json | 5 +- readme.txt | 56 +- src/{blocka => __blocka}/block.json | 0 src/{blocka => __blocka}/edit.js | 0 src/{blocka => __blocka}/editor.scss | 0 src/{blocka => __blocka}/index.js | 0 src/{blocka => __blocka}/save.js | 0 src/{blocka => __blocka}/style.scss | 0 .../block.json | 0 .../edit.js | 0 .../editor.scss | 0 .../index.js | 0 .../render.php | 0 .../save.js | 0 .../style.scss | 0 .../block.json | 6 +- .../edit.js | 0 .../editor.scss | 0 .../index.js | 0 .../nested-children/block.json | 30 + .../nested-children/edit.js | 0 .../nested-children/editor.scss | 0 .../nested-children/index.js | 0 .../nested-children/index_bot.js | 0 .../nested-children/save.js | 0 .../nested-children/style.scss | 0 .../save.js | 0 .../style.scss | 0 src/chapter-header/block.json | 6 +- src/chapter-header/edit.js | 19 +- src/chapter-header/render.php | 56 +- src/chapter-header/style.scss | 4 +- src/content-heading/block.json | 24 + src/content-heading/edit.js | 49 ++ src/content-heading/editor.scss | 9 + src/content-heading/index.js | 27 + src/content-heading/save.js | 15 + src/content-heading/style.scss | 62 ++ src/points-cles/.DS_Store | Bin 0 -> 6148 bytes src/points-cles/block.json | 27 + src/points-cles/edit.js | 32 + src/points-cles/editor.scss | 26 + src/points-cles/img/icon_feather_key.png | Bin 0 -> 8389 bytes src/points-cles/img/icon_feather_key.svg | 3 + src/points-cles/index.js | 32 + .../nested-children/block.json | 0 src/points-cles/nested-children/edit.js | 29 + src/points-cles/nested-children/editor.scss | 9 + src/points-cles/nested-children/index.js | 17 + src/points-cles/nested-children/index_bot.js | 11 + src/points-cles/nested-children/save.js | 8 + src/points-cles/nested-children/style.scss | 12 + src/points-cles/render.php | 22 + src/points-cles/save.js | 15 + src/points-cles/style.scss | 44 ++ src/questions-container-auto/block.json | 31 + src/questions-container-auto/edit.js | 152 +++++ src/questions-container-auto/editor.scss | 9 + src/questions-container-auto/index.js | 10 + src/questions-container-auto/render.php | 27 + src/questions-container-auto/save.js | 7 + src/questions-container-auto/style.scss | 16 + src/questions-container/block.json | 15 +- src/questions-container/edit.js | 194 ++++-- src/questions-container/render.php | 15 +- src/questions-container/style.scss | 8 +- src/wpblock-citation/block.json | 4 +- src/wpblock-citation/edit.js | 2 +- src/wpblock-cover/block.json | 4 +- templates.php | 25 + 171 files changed, 3628 insertions(+), 482 deletions(-) rename build/{blocka => __blocka}/block.json (100%) create mode 100644 build/__blocka/index.asset.php rename build/{blocka => __blocka}/index.css (83%) create mode 100644 build/__blocka/index.css.map rename build/{blocka => __blocka}/index.js (91%) create mode 100644 build/__blocka/index.js.map rename build/{blocka => __blocka}/style-index.css (84%) create mode 100644 build/__blocka/style-index.css.map rename build/{dynamic-posts => __dynamic-posts}/block.json (100%) rename build/{dynamic-posts => __dynamic-posts}/index.asset.php (76%) rename build/{dynamic-posts => __dynamic-posts}/index.css (81%) create mode 100644 build/__dynamic-posts/index.css.map rename build/{dynamic-posts => __dynamic-posts}/index.js (90%) create mode 100644 build/__dynamic-posts/index.js.map rename build/{dynamic-posts => __dynamic-posts}/render.php (100%) rename build/{dynamic-posts => __dynamic-posts}/style-index.css (83%) create mode 100644 build/__dynamic-posts/style-index.css.map rename build/{nested-parent => __nested-parent}/block.json (75%) create mode 100644 build/__nested-parent/index.asset.php rename build/{nested-parent => __nested-parent}/index.css (85%) create mode 100644 build/__nested-parent/index.css.map rename build/{nested-parent => __nested-parent}/index.js (84%) create mode 100644 build/__nested-parent/index.js.map create mode 100644 build/__nested-parent/nested-children/block.json create mode 100644 build/__nested-parent/nested-children/index.asset.php create mode 100644 build/__nested-parent/nested-children/index.css create mode 100644 build/__nested-parent/nested-children/index.css.map create mode 100644 build/__nested-parent/nested-children/index.js create mode 100644 build/__nested-parent/nested-children/index.js.map rename build/{nested-parent => __nested-parent}/style-index.css (86%) create mode 100644 build/__nested-parent/style-index.css.map delete mode 100644 build/blocka/index.asset.php delete mode 100644 build/blocka/index.css.map delete mode 100644 build/blocka/index.js.map delete mode 100644 build/blocka/style-index.css.map create mode 100644 build/content-heading/block.json create mode 100644 build/content-heading/index.asset.php create mode 100644 build/content-heading/index.css create mode 100644 build/content-heading/index.css.map create mode 100644 build/content-heading/index.js create mode 100644 build/content-heading/index.js.map create mode 100644 build/content-heading/style-index.css create mode 100644 build/content-heading/style-index.css.map delete mode 100644 build/dynamic-posts/index.css.map delete mode 100644 build/dynamic-posts/index.js.map delete mode 100644 build/dynamic-posts/style-index.css.map create mode 100644 build/images/icon_feather_key.26c1f367.png delete mode 100644 build/nested-parent/index.asset.php delete mode 100644 build/nested-parent/index.css.map delete mode 100644 build/nested-parent/index.js.map delete mode 100644 build/nested-parent/nested-children/index.asset.php delete mode 100644 build/nested-parent/nested-children/index.css.map delete mode 100644 build/nested-parent/nested-children/index.js.map delete mode 100644 build/nested-parent/style-index.css.map create mode 100644 build/points-cles/block.json create mode 100644 build/points-cles/index.asset.php create mode 100644 build/points-cles/index.css create mode 100644 build/points-cles/index.css.map create mode 100644 build/points-cles/index.js create mode 100644 build/points-cles/index.js.map rename build/{nested-parent => points-cles}/nested-children/block.json (100%) create mode 100644 build/points-cles/nested-children/index.asset.php rename build/{nested-parent => points-cles}/nested-children/index.css (90%) create mode 100644 build/points-cles/nested-children/index.css.map rename build/{nested-parent => points-cles}/nested-children/index.js (87%) create mode 100644 build/points-cles/nested-children/index.js.map create mode 100644 build/points-cles/render.php create mode 100644 build/points-cles/style-index.css create mode 100644 build/points-cles/style-index.css.map create mode 100644 build/questions-container-auto/block.json create mode 100644 build/questions-container-auto/index.asset.php create mode 100644 build/questions-container-auto/index.css create mode 100644 build/questions-container-auto/index.css.map create mode 100644 build/questions-container-auto/index.js create mode 100644 build/questions-container-auto/index.js.map create mode 100644 build/questions-container-auto/render.php create mode 100644 build/questions-container-auto/style-index.css create mode 100644 build/questions-container-auto/style-index.css.map rename src/{blocka => __blocka}/block.json (100%) rename src/{blocka => __blocka}/edit.js (100%) rename src/{blocka => __blocka}/editor.scss (100%) rename src/{blocka => __blocka}/index.js (100%) rename src/{blocka => __blocka}/save.js (100%) rename src/{blocka => __blocka}/style.scss (100%) rename src/{dynamic-posts => __dynamic-posts}/block.json (100%) rename src/{dynamic-posts => __dynamic-posts}/edit.js (100%) rename src/{dynamic-posts => __dynamic-posts}/editor.scss (100%) rename src/{dynamic-posts => __dynamic-posts}/index.js (100%) rename src/{dynamic-posts => __dynamic-posts}/render.php (100%) rename src/{dynamic-posts => __dynamic-posts}/save.js (100%) rename src/{dynamic-posts => __dynamic-posts}/style.scss (100%) rename src/{nested-parent => __nested-parent}/block.json (74%) rename src/{nested-parent => __nested-parent}/edit.js (100%) rename src/{nested-parent => __nested-parent}/editor.scss (100%) rename src/{nested-parent => __nested-parent}/index.js (100%) create mode 100644 src/__nested-parent/nested-children/block.json rename src/{nested-parent => __nested-parent}/nested-children/edit.js (100%) rename src/{nested-parent => __nested-parent}/nested-children/editor.scss (100%) rename src/{nested-parent => __nested-parent}/nested-children/index.js (100%) rename src/{nested-parent => __nested-parent}/nested-children/index_bot.js (100%) rename src/{nested-parent => __nested-parent}/nested-children/save.js (100%) rename src/{nested-parent => __nested-parent}/nested-children/style.scss (100%) rename src/{nested-parent => __nested-parent}/save.js (100%) rename src/{nested-parent => __nested-parent}/style.scss (100%) create mode 100644 src/content-heading/block.json create mode 100644 src/content-heading/edit.js create mode 100644 src/content-heading/editor.scss create mode 100644 src/content-heading/index.js create mode 100644 src/content-heading/save.js create mode 100644 src/content-heading/style.scss create mode 100644 src/points-cles/.DS_Store create mode 100644 src/points-cles/block.json create mode 100644 src/points-cles/edit.js create mode 100644 src/points-cles/editor.scss create mode 100644 src/points-cles/img/icon_feather_key.png create mode 100644 src/points-cles/img/icon_feather_key.svg create mode 100644 src/points-cles/index.js rename src/{nested-parent => points-cles}/nested-children/block.json (100%) create mode 100644 src/points-cles/nested-children/edit.js create mode 100644 src/points-cles/nested-children/editor.scss create mode 100644 src/points-cles/nested-children/index.js create mode 100644 src/points-cles/nested-children/index_bot.js create mode 100644 src/points-cles/nested-children/save.js create mode 100644 src/points-cles/nested-children/style.scss create mode 100644 src/points-cles/render.php create mode 100644 src/points-cles/save.js create mode 100644 src/points-cles/style.scss create mode 100644 src/questions-container-auto/block.json create mode 100644 src/questions-container-auto/edit.js create mode 100644 src/questions-container-auto/editor.scss create mode 100644 src/questions-container-auto/index.js create mode 100644 src/questions-container-auto/render.php create mode 100644 src/questions-container-auto/save.js create mode 100644 src/questions-container-auto/style.scss create mode 100644 templates.php diff --git a/build/blocka/block.json b/build/__blocka/block.json similarity index 100% rename from build/blocka/block.json rename to build/__blocka/block.json diff --git a/build/__blocka/index.asset.php b/build/__blocka/index.asset.php new file mode 100644 index 0000000..c3b7f59 --- /dev/null +++ b/build/__blocka/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'fed41a0ebfd9c9a91a82'); diff --git a/build/blocka/index.css b/build/__blocka/index.css similarity index 83% rename from build/blocka/index.css rename to build/__blocka/index.css index 89d984d..544a1ca 100644 --- a/build/blocka/index.css +++ b/build/__blocka/index.css @@ -1,6 +1,6 @@ -/*!***********************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/blocka/editor.scss ***! - \***********************************************************************************************************************************************************************************************************************************************/ +/*!*************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__blocka/editor.scss ***! + \*************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied inside the editor only. * diff --git a/build/__blocka/index.css.map b/build/__blocka/index.css.map new file mode 100644 index 0000000..0fa8720 --- /dev/null +++ b/build/__blocka/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__blocka/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__blocka/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/blocka/index.js b/build/__blocka/index.js similarity index 91% rename from build/blocka/index.js rename to build/__blocka/index.js index 2e24926..9dca3ba 100644 --- a/build/blocka/index.js +++ b/build/__blocka/index.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./src/blocka/edit.js": -/*!****************************!*\ - !*** ./src/blocka/edit.js ***! - \****************************/ +/***/ "./src/__blocka/edit.js": +/*!******************************!*\ + !*** ./src/__blocka/edit.js ***! + \******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -19,7 +19,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/blocka/editor.scss"); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/__blocka/editor.scss"); @@ -46,19 +46,19 @@ function Edit({ /***/ }), -/***/ "./src/blocka/index.js": -/*!*****************************!*\ - !*** ./src/blocka/index.js ***! - \*****************************/ +/***/ "./src/__blocka/index.js": +/*!*******************************!*\ + !*** ./src/__blocka/index.js ***! + \*******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/blocka/style.scss"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/blocka/edit.js"); -/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/blocka/save.js"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/blocka/block.json"); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__blocka/style.scss"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/__blocka/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/__blocka/save.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./block.json */ "./src/__blocka/block.json"); @@ -71,10 +71,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/blocka/save.js": -/*!****************************!*\ - !*** ./src/blocka/save.js ***! - \****************************/ +/***/ "./src/__blocka/save.js": +/*!******************************!*\ + !*** ./src/__blocka/save.js ***! + \******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -104,10 +104,10 @@ function save({ /***/ }), -/***/ "./src/blocka/editor.scss": -/*!********************************!*\ - !*** ./src/blocka/editor.scss ***! - \********************************/ +/***/ "./src/__blocka/editor.scss": +/*!**********************************!*\ + !*** ./src/__blocka/editor.scss ***! + \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -116,10 +116,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/blocka/style.scss": -/*!*******************************!*\ - !*** ./src/blocka/style.scss ***! - \*******************************/ +/***/ "./src/__blocka/style.scss": +/*!*********************************!*\ + !*** ./src/__blocka/style.scss ***! + \*********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -195,10 +195,10 @@ function _extends() { /***/ }), -/***/ "./src/blocka/block.json": -/*!*******************************!*\ - !*** ./src/blocka/block.json ***! - \*******************************/ +/***/ "./src/__blocka/block.json": +/*!*********************************!*\ + !*** ./src/__blocka/block.json ***! + \*********************************/ /***/ ((module) => { module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/blocka","version":"0.1.0","title":"Multiple Block A","category":"wpblock-blocks","description":"Nouvel exemple de block Multiple","supports":{"html":false},"textdomain":"blocka","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}'); @@ -315,8 +315,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ "blocka/index": 0, -/******/ "blocka/style-index": 0 +/******/ "__blocka/index": 0, +/******/ "__blocka/style-index": 0 /******/ }; /******/ /******/ // no chunk on demand loading @@ -366,7 +366,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["blocka/style-index"], () => (__webpack_require__("./src/blocka/index.js"))) +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__blocka/style-index"], () => (__webpack_require__("./src/__blocka/index.js"))) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ /******/ })() diff --git a/build/__blocka/index.js.map b/build/__blocka/index.js.map new file mode 100644 index 0000000..5759a66 --- /dev/null +++ b/build/__blocka/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__blocka/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAUJ;AACV;AACR,SAASS,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAS,CAAC,GAAGF,UAAU;EAC/B,OACCG,iEAAA,CAACV,6DAAQ,EAAAW,0EAAA,KACJb,sEAAa,CAAC,CAAC;IACnBc,SAAS,EAAC,uCAAuC;IACjDC,QAAQ,EAAGC,KAAK,IAAKN,aAAa,CAAC;MAAEC,QAAQ,EAAEK;IAAM,CAAC,CAAE;IACxDA,KAAK,EAAEL,QAAS;IAChBM,WAAW,EAAElB,mDAAE,CAAC,qBAAqB,EAAE,YAAY,CAAE;IACrDmB,OAAO,EAAC,IAAI;IACZC,cAAc,EAAE;EAAG,EACnB,CAAC;AAEJ;;;;;;;;;;;;;;;;;ACzBsD;AAChC;AAEI;AACA;AACU;AAEpCC,oEAAiB,CAACE,6CAAa,EAAE;EAChCE,IAAI,EAAEhB,6CAAI;EACVa,IAAIA,+CAAAA;AACL,CAAC,CAAC;;;;;;;;;;;;;;;;;;;ACV6E;AAEhE,SAASA,IAAIA,CAAC;EAAEZ;AAAW,CAAC,EAAE;EAC5C,MAAM;IAAEE;EAAS,CAAC,GAAGF,UAAU;EAE/B,OACCG,iEAAA,QACKZ,kEAAa,CAACqB,IAAI,CAAC;IACtBP,SAAS,EAAG;EACb,CAAC,CAAC,EAEFF,iEAAA,CAACV,6DAAQ,CAACuB,OAAO;IAACP,OAAO,EAAC,IAAI;IAACF,KAAK,EAAEL,QAAS;IAACG,SAAS,EAAC;EAAa,CAAE,CACrE,CAAC;AAER;;;;;;;;;;;ACdA;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACAe;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;UCbA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/__blocka/edit.js","webpack://test-de-block/./src/__blocka/index.js","webpack://test-de-block/./src/__blocka/save.js","webpack://test-de-block/./src/__blocka/editor.scss?dc9e","webpack://test-de-block/./src/__blocka/style.scss?56f7","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { montexte } = attributes;\n\treturn (\n\t\t setAttributes({ montexte: value })}\n\t\t\tvalue={montexte}\n\t\t\tplaceholder={__(\"Votre Text Monsieur\", \"mon-espace\")}\n\t\t\ttagName=\"h2\"\n\t\t\tallowedFormats={[]}\n\t\t/>\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { montexte } = attributes;\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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\"__blocka/index\": 0,\n\t\"__blocka/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"__blocka/style-index\"], () => (__webpack_require__(\"./src/__blocka/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","montexte","createElement","_extends","className","onChange","value","placeholder","tagName","allowedFormats","registerBlockType","save","metadata","name","edit","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/blocka/style-index.css b/build/__blocka/style-index.css similarity index 84% rename from build/blocka/style-index.css rename to build/__blocka/style-index.css index 00041cb..8ab8d2f 100644 --- a/build/blocka/style-index.css +++ b/build/__blocka/style-index.css @@ -1,6 +1,6 @@ -/*!**********************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/blocka/style.scss ***! - \**********************************************************************************************************************************************************************************************************************************************/ +/*!************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__blocka/style.scss ***! + \************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied both on the front of your site * and in the editor. diff --git a/build/__blocka/style-index.css.map b/build/__blocka/style-index.css.map new file mode 100644 index 0000000..7625eb5 --- /dev/null +++ b/build/__blocka/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__blocka/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/__blocka/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/dynamic-posts/block.json b/build/__dynamic-posts/block.json similarity index 100% rename from build/dynamic-posts/block.json rename to build/__dynamic-posts/block.json diff --git a/build/dynamic-posts/index.asset.php b/build/__dynamic-posts/index.asset.php similarity index 76% rename from build/dynamic-posts/index.asset.php rename to build/__dynamic-posts/index.asset.php index b9b14fe..5da8174 100644 --- a/build/dynamic-posts/index.asset.php +++ b/build/__dynamic-posts/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'db81f0cab2f94cc04e80'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b8f7b1f6cd36b8327cf4'); diff --git a/build/dynamic-posts/index.css b/build/__dynamic-posts/index.css similarity index 81% rename from build/dynamic-posts/index.css rename to build/__dynamic-posts/index.css index cd9ef90..0cdfddb 100644 --- a/build/dynamic-posts/index.css +++ b/build/__dynamic-posts/index.css @@ -1,6 +1,6 @@ -/*!******************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/dynamic-posts/editor.scss ***! - \******************************************************************************************************************************************************************************************************************************************************/ +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__dynamic-posts/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied inside the editor only. * diff --git a/build/__dynamic-posts/index.css.map b/build/__dynamic-posts/index.css.map new file mode 100644 index 0000000..b4a58d5 --- /dev/null +++ b/build/__dynamic-posts/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__dynamic-posts/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__dynamic-posts/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/dynamic-posts/index.js b/build/__dynamic-posts/index.js similarity index 90% rename from build/dynamic-posts/index.js rename to build/__dynamic-posts/index.js index 5d62f63..a2e17c4 100644 --- a/build/dynamic-posts/index.js +++ b/build/__dynamic-posts/index.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./src/dynamic-posts/edit.js": -/*!***********************************!*\ - !*** ./src/dynamic-posts/edit.js ***! - \***********************************/ +/***/ "./src/__dynamic-posts/edit.js": +/*!*************************************!*\ + !*** ./src/__dynamic-posts/edit.js ***! + \*************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -22,7 +22,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/dynamic-posts/editor.scss"); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/__dynamic-posts/editor.scss"); @@ -38,18 +38,18 @@ function Edit({ /***/ }), -/***/ "./src/dynamic-posts/index.js": -/*!************************************!*\ - !*** ./src/dynamic-posts/index.js ***! - \************************************/ +/***/ "./src/__dynamic-posts/index.js": +/*!**************************************!*\ + !*** ./src/__dynamic-posts/index.js ***! + \**************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/dynamic-posts/style.scss"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/dynamic-posts/edit.js"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/dynamic-posts/block.json"); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__dynamic-posts/style.scss"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/__dynamic-posts/edit.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/__dynamic-posts/block.json"); @@ -60,10 +60,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/dynamic-posts/editor.scss": -/*!***************************************!*\ - !*** ./src/dynamic-posts/editor.scss ***! - \***************************************/ +/***/ "./src/__dynamic-posts/editor.scss": +/*!*****************************************!*\ + !*** ./src/__dynamic-posts/editor.scss ***! + \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -72,10 +72,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/dynamic-posts/style.scss": -/*!**************************************!*\ - !*** ./src/dynamic-posts/style.scss ***! - \**************************************/ +/***/ "./src/__dynamic-posts/style.scss": +/*!****************************************!*\ + !*** ./src/__dynamic-posts/style.scss ***! + \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -144,10 +144,10 @@ module.exports = window["wp"]["i18n"]; /***/ }), -/***/ "./src/dynamic-posts/block.json": -/*!**************************************!*\ - !*** ./src/dynamic-posts/block.json ***! - \**************************************/ +/***/ "./src/__dynamic-posts/block.json": +/*!****************************************!*\ + !*** ./src/__dynamic-posts/block.json ***! + \****************************************/ /***/ ((module) => { module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/wpblock-latest-posts","version":"0.1.0","title":"Wpblock Latest Posts","category":"wpblock-blocks","description":"Un bloc dynamique qu affiche les derniers posts. #BlockStylesVariation #Dynamic #ToggleControl #DropDown","supports":{"html":false},"styles":[{"name":"post_grid","isDefault":true,"label":"Grille de post"},{"name":"post_list","label":"Liste de post"}],"example":{"attributes":{"numberOfPosts":4,"postType":"post","displayFeaturedImage":true,"showDescription":true,"blocktitle":"Latest Posts","blockDescriptionText":"Ma description"}},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"numberOfPosts":{"type":"number","default":4},"postType":{"type":"string","default":"post"},"displayFeaturedImage":{"type":"boolean","default":true},"showDescription":{"type":"boolean","default":true},"blocktitle":{"type":"string","default":"Latest Posts"},"blockDescriptionText":{"type":"string","default":"Ma description"}}}'); @@ -264,8 +264,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ "dynamic-posts/index": 0, -/******/ "dynamic-posts/style-index": 0 +/******/ "__dynamic-posts/index": 0, +/******/ "__dynamic-posts/style-index": 0 /******/ }; /******/ /******/ // no chunk on demand loading @@ -315,7 +315,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["dynamic-posts/style-index"], () => (__webpack_require__("./src/dynamic-posts/index.js"))) +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__dynamic-posts/style-index"], () => (__webpack_require__("./src/__dynamic-posts/index.js"))) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ /******/ })() diff --git a/build/__dynamic-posts/index.js.map b/build/__dynamic-posts/index.js.map new file mode 100644 index 0000000..66954d1 --- /dev/null +++ b/build/__dynamic-posts/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__dynamic-posts/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAMJ;AAWF;AACa,CAAC;AACtB;AAER,SAASe,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,OACCC,iEAAA,CAAAC,wDAAA,QACCD,iEAAA,YAAG,MAAO,CACT,CAAC;AAEL;;;;;;;;;;;;;;;;AC3BsD;AAEhC;AAEI;AACU;AAEpCE,oEAAiB,CAACC,6CAAa,EAAE;EAChCE,IAAI,EAAER,6CAAIA;AACX,CAAC,CAAC;;;;;;;;;;;ACTF;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/__dynamic-posts/edit.js","webpack://test-de-block/./src/__dynamic-posts/index.js","webpack://test-de-block/./src/__dynamic-posts/editor.scss?e8ad","webpack://test-de-block/./src/__dynamic-posts/style.scss?c6ff","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\treturn (\n\t\t<>\n\t\t\t

test

\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","// extracted by mini-css-extract-plugin\nexport {};","// 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\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"__dynamic-posts/index\": 0,\n\t\"__dynamic-posts/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"__dynamic-posts/style-index\"], () => (__webpack_require__(\"./src/__dynamic-posts/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","Edit","attributes","setAttributes","createElement","Fragment","registerBlockType","metadata","name","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/build/dynamic-posts/render.php b/build/__dynamic-posts/render.php similarity index 100% rename from build/dynamic-posts/render.php rename to build/__dynamic-posts/render.php diff --git a/build/dynamic-posts/style-index.css b/build/__dynamic-posts/style-index.css similarity index 83% rename from build/dynamic-posts/style-index.css rename to build/__dynamic-posts/style-index.css index 12b732e..1a1961f 100644 --- a/build/dynamic-posts/style-index.css +++ b/build/__dynamic-posts/style-index.css @@ -1,6 +1,6 @@ -/*!*****************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/dynamic-posts/style.scss ***! - \*****************************************************************************************************************************************************************************************************************************************************/ +/*!*******************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__dynamic-posts/style.scss ***! + \*******************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied both on the front of your site * and in the editor. diff --git a/build/__dynamic-posts/style-index.css.map b/build/__dynamic-posts/style-index.css.map new file mode 100644 index 0000000..423b52f --- /dev/null +++ b/build/__dynamic-posts/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__dynamic-posts/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/__dynamic-posts/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/block.json b/build/__nested-parent/block.json similarity index 75% rename from build/nested-parent/block.json rename to build/__nested-parent/block.json index 7871907..0e963e0 100644 --- a/build/nested-parent/block.json +++ b/build/__nested-parent/block.json @@ -1,15 +1,15 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 2, - "name": "homegrade-content-blocks//nested-parent", + "name": "homegrade-content-blocks/nested-parent", "version": "0.1.0", "title": "Wpblock Nested Parent", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "description": "Parent Nested. #Nested", "supports": { "html": false }, - "textdomain": "nested-parent", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", diff --git a/build/__nested-parent/index.asset.php b/build/__nested-parent/index.asset.php new file mode 100644 index 0000000..d8ddc8a --- /dev/null +++ b/build/__nested-parent/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '19243facfafb4ab0327f'); diff --git a/build/nested-parent/index.css b/build/__nested-parent/index.css similarity index 85% rename from build/nested-parent/index.css rename to build/__nested-parent/index.css index 3d711b6..8ace0bf 100644 --- a/build/nested-parent/index.css +++ b/build/__nested-parent/index.css @@ -1,6 +1,6 @@ -/*!**********************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/nested-children/editor.scss ***! - \**********************************************************************************************************************************************************************************************************************************************************************/ +/*!************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/nested-children/editor.scss ***! + \************************************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied inside the editor only. * @@ -9,9 +9,9 @@ .wp-block-create-block-blocka { border: 1px dotted #f00; } -/*!******************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/editor.scss ***! - \******************************************************************************************************************************************************************************************************************************************************/ +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied inside the editor only. * diff --git a/build/__nested-parent/index.css.map b/build/__nested-parent/index.css.map new file mode 100644 index 0000000..057c503 --- /dev/null +++ b/build/__nested-parent/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__nested-parent/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C;;;;ACPA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__nested-parent/nested-children/editor.scss","webpack://test-de-block/./src/__nested-parent/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n","/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/index.js b/build/__nested-parent/index.js similarity index 84% rename from build/nested-parent/index.js rename to build/__nested-parent/index.js index f3d4a62..4599e5d 100644 --- a/build/nested-parent/index.js +++ b/build/__nested-parent/index.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./src/nested-parent/edit.js": -/*!***********************************!*\ - !*** ./src/nested-parent/edit.js ***! - \***********************************/ +/***/ "./src/__nested-parent/edit.js": +/*!*************************************!*\ + !*** ./src/__nested-parent/edit.js ***! + \*************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -19,7 +19,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/nested-parent/editor.scss"); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/__nested-parent/editor.scss"); @@ -56,10 +56,10 @@ function Edit({ /***/ }), -/***/ "./src/nested-parent/index.js": -/*!************************************!*\ - !*** ./src/nested-parent/index.js ***! - \************************************/ +/***/ "./src/__nested-parent/index.js": +/*!**************************************!*\ + !*** ./src/__nested-parent/index.js ***! + \**************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -69,11 +69,11 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/nested-parent/style.scss"); -/* harmony import */ var _nested_children__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nested-children */ "./src/nested-parent/nested-children/index.js"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/nested-parent/edit.js"); -/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./save */ "./src/nested-parent/save.js"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block.json */ "./src/nested-parent/block.json"); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/__nested-parent/style.scss"); +/* harmony import */ var _nested_children__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nested-children */ "./src/__nested-parent/nested-children/index.js"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/__nested-parent/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./save */ "./src/__nested-parent/save.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block.json */ "./src/__nested-parent/block.json"); @@ -109,10 +109,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/nested-children/edit.js": -/*!***************************************************!*\ - !*** ./src/nested-parent/nested-children/edit.js ***! - \***************************************************/ +/***/ "./src/__nested-parent/nested-children/edit.js": +/*!*****************************************************!*\ + !*** ./src/__nested-parent/nested-children/edit.js ***! + \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -125,7 +125,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/nested-parent/nested-children/editor.scss"); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/__nested-parent/nested-children/editor.scss"); @@ -152,19 +152,19 @@ function Edit({ /***/ }), -/***/ "./src/nested-parent/nested-children/index.js": -/*!****************************************************!*\ - !*** ./src/nested-parent/nested-children/index.js ***! - \****************************************************/ +/***/ "./src/__nested-parent/nested-children/index.js": +/*!******************************************************!*\ + !*** ./src/__nested-parent/nested-children/index.js ***! + \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/nested-parent/nested-children/style.scss"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/nested-parent/nested-children/block.json"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/nested-parent/nested-children/edit.js"); -/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/nested-parent/nested-children/save.js"); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__nested-parent/nested-children/style.scss"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/__nested-parent/nested-children/block.json"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/__nested-parent/nested-children/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/__nested-parent/nested-children/save.js"); @@ -183,10 +183,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/nested-children/save.js": -/*!***************************************************!*\ - !*** ./src/nested-parent/nested-children/save.js ***! - \***************************************************/ +/***/ "./src/__nested-parent/nested-children/save.js": +/*!*****************************************************!*\ + !*** ./src/__nested-parent/nested-children/save.js ***! + \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -215,10 +215,10 @@ function save({ /***/ }), -/***/ "./src/nested-parent/save.js": -/*!***********************************!*\ - !*** ./src/nested-parent/save.js ***! - \***********************************/ +/***/ "./src/__nested-parent/save.js": +/*!*************************************!*\ + !*** ./src/__nested-parent/save.js ***! + \*************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -248,10 +248,10 @@ function save({ /***/ }), -/***/ "./src/nested-parent/editor.scss": -/*!***************************************!*\ - !*** ./src/nested-parent/editor.scss ***! - \***************************************/ +/***/ "./src/__nested-parent/editor.scss": +/*!*****************************************!*\ + !*** ./src/__nested-parent/editor.scss ***! + \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -260,10 +260,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/nested-children/editor.scss": -/*!*******************************************************!*\ - !*** ./src/nested-parent/nested-children/editor.scss ***! - \*******************************************************/ +/***/ "./src/__nested-parent/nested-children/editor.scss": +/*!*********************************************************!*\ + !*** ./src/__nested-parent/nested-children/editor.scss ***! + \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -272,10 +272,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/nested-children/style.scss": -/*!******************************************************!*\ - !*** ./src/nested-parent/nested-children/style.scss ***! - \******************************************************/ +/***/ "./src/__nested-parent/nested-children/style.scss": +/*!********************************************************!*\ + !*** ./src/__nested-parent/nested-children/style.scss ***! + \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -284,10 +284,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/style.scss": -/*!**************************************!*\ - !*** ./src/nested-parent/style.scss ***! - \**************************************/ +/***/ "./src/__nested-parent/style.scss": +/*!****************************************!*\ + !*** ./src/__nested-parent/style.scss ***! + \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -363,23 +363,23 @@ function _extends() { /***/ }), -/***/ "./src/nested-parent/block.json": -/*!**************************************!*\ - !*** ./src/nested-parent/block.json ***! - \**************************************/ +/***/ "./src/__nested-parent/block.json": +/*!****************************************!*\ + !*** ./src/__nested-parent/block.json ***! + \****************************************/ /***/ ((module) => { -module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks//nested-parent","version":"0.1.0","title":"Wpblock Nested Parent","category":"wpblock-blocks","description":"Parent Nested. #Nested","supports":{"html":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/nested-parent","version":"0.1.0","title":"Wpblock Nested Parent","category":"homegrade-blocks","description":"Parent Nested. #Nested","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"montexte":{"type":"string","source":"html","selector":"h2"}}}'); /***/ }), -/***/ "./src/nested-parent/nested-children/block.json": -/*!******************************************************!*\ - !*** ./src/nested-parent/nested-children/block.json ***! - \******************************************************/ +/***/ "./src/__nested-parent/nested-children/block.json": +/*!********************************************************!*\ + !*** ./src/__nested-parent/nested-children/block.json ***! + \********************************************************/ /***/ ((module) => { -module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"homegrade-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}'); /***/ }) @@ -493,8 +493,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ "nested-parent/index": 0, -/******/ "nested-parent/style-index": 0 +/******/ "__nested-parent/index": 0, +/******/ "__nested-parent/style-index": 0 /******/ }; /******/ /******/ // no chunk on demand loading @@ -544,7 +544,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["nested-parent/style-index"], () => (__webpack_require__("./src/nested-parent/index.js"))) +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__nested-parent/style-index"], () => (__webpack_require__("./src/__nested-parent/index.js"))) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ /******/ })() diff --git a/build/__nested-parent/index.js.map b/build/__nested-parent/index.js.map new file mode 100644 index 0000000..99e900b --- /dev/null +++ b/build/__nested-parent/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__nested-parent/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAWJ;AACV;AACR,SAASU,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAS,CAAC,GAAGF,UAAU;EAC/B,OACCG,iEAAA,YAAAC,0EAAA,KACKd,sEAAa,CAAC,CAAC;IACnBe,SAAS,EAAC;EAAuC,IAEjDF,iEAAA,CAACX,6DAAQ;IACRc,QAAQ,EAAGC,KAAK,IAAKN,aAAa,CAAC;MAAEC,QAAQ,EAAEK;IAAM,CAAC,CAAE;IACxDA,KAAK,EAAEL,QAAS;IAChBM,WAAW,EAAEnB,mDAAE,CAAC,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;IAACG,SAAS,EAAC;EAAa,CAAE,CACjE,CAAC;AAEZ;;;;;;;;;;;ACfA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACAe;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;UCbA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/__nested-parent/edit.js","webpack://test-de-block/./src/__nested-parent/index.js","webpack://test-de-block/./src/__nested-parent/nested-children/edit.js","webpack://test-de-block/./src/__nested-parent/nested-children/index.js","webpack://test-de-block/./src/__nested-parent/nested-children/save.js","webpack://test-de-block/./src/__nested-parent/save.js","webpack://test-de-block/./src/__nested-parent/editor.scss?2108","webpack://test-de-block/./src/__nested-parent/nested-children/editor.scss?50f2","webpack://test-de-block/./src/__nested-parent/nested-children/style.scss?5e4b","webpack://test-de-block/./src/__nested-parent/style.scss?91f7","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInserter,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { montexte } = attributes;\n\treturn (\n\t\t\n\t\t\t setAttributes({ montexte: value })}\n\t\t\t\tvalue={montexte}\n\t\t\t\tplaceholder={__(\"PARENT SECTION TITLE\", \"mon-espace\")}\n\t\t\t\ttagName=\"h2\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport { __ } from \"@wordpress/i18n\";\nimport \"./style.scss\";\n\nimport \"./nested-children\";\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\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#0414eb\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t
\n\t\t\t setAttributes({ userName: value })}\n\t\t\t\tvalue={userName}\n\t\t\t\tplaceholder={__(\"UserName Here\", \"text-box\")}\n\t\t\t\ttagName=\"p\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\n\t\t\t

{userPosition}

\n\t\t
\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: \"smiley\",\n\tcategory: \"wpblock-blocks\",\n\tparent: [\"wpblocks-multiple/nested-parent\"],\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t\n\t);\n}\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { montexte } = attributes;\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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\"__nested-parent/index\": 0,\n\t\"__nested-parent/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"__nested-parent/style-index\"], () => (__webpack_require__(\"./src/__nested-parent/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","Inserter","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","montexte","createElement","_extends","className","onChange","value","placeholder","tagName","allowedFormats","allowedBlocks","registerBlockType","save","metadata","name","icon","src","id","xmlns","viewBox","d","foreground","edit","userName","userPosition","Save","title","category","parent","supports","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/__nested-parent/nested-children/block.json b/build/__nested-parent/nested-children/block.json new file mode 100644 index 0000000..03f20a6 --- /dev/null +++ b/build/__nested-parent/nested-children/block.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wpblocks-multiple/nested-children", + "version": "0.1.0", + "title": "Nested Childrenes", + "category": "homegrade-blocks", + "icon": { + "background": "#0414eb", + "foreground": "#fff", + "src": "admin-plugins" + }, + "description": "Children Nested. #ChildrenNested", + "supports": { + "html": false, + "reusable": false + }, + "textdomain": "nested-parent", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "attributes": { + "userName": { + "type": "string" + }, + "userPosition": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/build/__nested-parent/nested-children/index.asset.php b/build/__nested-parent/nested-children/index.asset.php new file mode 100644 index 0000000..8ac86d7 --- /dev/null +++ b/build/__nested-parent/nested-children/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'b01f4ced5024082a868b'); diff --git a/build/__nested-parent/nested-children/index.css b/build/__nested-parent/nested-children/index.css new file mode 100644 index 0000000..d58d180 --- /dev/null +++ b/build/__nested-parent/nested-children/index.css @@ -0,0 +1,13 @@ +/*!************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/nested-children/editor.scss ***! + \************************************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ +.wp-block-create-block-blocka { + border: 1px dotted #f00; +} + +/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/build/__nested-parent/nested-children/index.css.map b/build/__nested-parent/nested-children/index.css.map new file mode 100644 index 0000000..d8fdfda --- /dev/null +++ b/build/__nested-parent/nested-children/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__nested-parent/nested-children/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/__nested-parent/nested-children/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/__nested-parent/nested-children/index.js b/build/__nested-parent/nested-children/index.js new file mode 100644 index 0000000..034ecbb --- /dev/null +++ b/build/__nested-parent/nested-children/index.js @@ -0,0 +1,351 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/__nested-parent/nested-children/edit.js": +/*!*****************************************************!*\ + !*** ./src/__nested-parent/nested-children/edit.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Edit) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/__nested-parent/nested-children/editor.scss"); + + + + +function Edit({ + attributes, + setAttributes +}) { + const { + userName, + userPosition + } = attributes; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, { + className: "user-name", + onChange: value => setAttributes({ + userName: value + }), + value: userName, + placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("UserName Here", "text-box"), + tagName: "p", + allowedFormats: [] + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, userPosition)); +} + +/***/ }), + +/***/ "./src/__nested-parent/nested-children/index.js": +/*!******************************************************!*\ + !*** ./src/__nested-parent/nested-children/index.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/__nested-parent/nested-children/style.scss"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/__nested-parent/nested-children/block.json"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/__nested-parent/nested-children/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/__nested-parent/nested-children/save.js"); + + + + + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__.name, { + title: _block_json__WEBPACK_IMPORTED_MODULE_2__.title, + icon: "smiley", + category: "wpblock-blocks", + parent: ["wpblocks-multiple/nested-parent"], + supports: _block_json__WEBPACK_IMPORTED_MODULE_2__.supports, + attributes: _block_json__WEBPACK_IMPORTED_MODULE_2__.attributes, + edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"], + save: _save__WEBPACK_IMPORTED_MODULE_4__["default"] +}); + +/***/ }), + +/***/ "./src/__nested-parent/nested-children/save.js": +/*!*****************************************************!*\ + !*** ./src/__nested-parent/nested-children/save.js ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ save) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); + + +function save({ + attributes +}) { + const { + userName, + userPosition + } = attributes; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, { + tagName: "h2", + value: userName, + className: "mydummytext" + }); +} + +/***/ }), + +/***/ "./src/__nested-parent/nested-children/editor.scss": +/*!*********************************************************!*\ + !*** ./src/__nested-parent/nested-children/editor.scss ***! + \*********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/__nested-parent/nested-children/style.scss": +/*!********************************************************!*\ + !*** ./src/__nested-parent/nested-children/style.scss ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "@wordpress/block-editor": +/*!*************************************!*\ + !*** external ["wp","blockEditor"] ***! + \*************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blockEditor"]; + +/***/ }), + +/***/ "@wordpress/blocks": +/*!********************************!*\ + !*** external ["wp","blocks"] ***! + \********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blocks"]; + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["element"]; + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["i18n"]; + +/***/ }), + +/***/ "./src/__nested-parent/nested-children/block.json": +/*!********************************************************!*\ + !*** ./src/__nested-parent/nested-children/block.json ***! + \********************************************************/ +/***/ ((module) => { + +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"homegrade-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}'); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "__nested-parent/nested-children/index": 0, +/******/ "__nested-parent/style-index": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = globalThis["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module depends on other loaded chunks and execution need to be delayed +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["__nested-parent/style-index"], () => (__webpack_require__("./src/__nested-parent/nested-children/index.js"))) +/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ +/******/ })() +; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/__nested-parent/nested-children/index.js.map b/build/__nested-parent/nested-children/index.js.map new file mode 100644 index 0000000..013ba59 --- /dev/null +++ b/build/__nested-parent/nested-children/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"__nested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;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/__nested-parent/nested-children/edit.js","webpack://test-de-block/./src/__nested-parent/nested-children/index.js","webpack://test-de-block/./src/__nested-parent/nested-children/save.js","webpack://test-de-block/./src/__nested-parent/nested-children/editor.scss?50f2","webpack://test-de-block/./src/__nested-parent/nested-children/style.scss?5e4b","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t
\n\t\t\t setAttributes({ userName: value })}\n\t\t\t\tvalue={userName}\n\t\t\t\tplaceholder={__(\"UserName Here\", \"text-box\")}\n\t\t\t\ttagName=\"p\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\n\t\t\t

{userPosition}

\n\t\t
\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: \"smiley\",\n\tcategory: \"wpblock-blocks\",\n\tparent: [\"wpblocks-multiple/nested-parent\"],\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"__nested-parent/nested-children/index\": 0,\n\t\"__nested-parent/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"__nested-parent/style-index\"], () => (__webpack_require__(\"./src/__nested-parent/nested-children/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","userName","userPosition","createElement","className","onChange","value","placeholder","tagName","allowedFormats","registerBlockType","metadata","Save","name","title","icon","category","parent","supports","edit","save","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/style-index.css b/build/__nested-parent/style-index.css similarity index 86% rename from build/nested-parent/style-index.css rename to build/__nested-parent/style-index.css index 3938d8d..b449ec6 100644 --- a/build/nested-parent/style-index.css +++ b/build/__nested-parent/style-index.css @@ -1,6 +1,6 @@ -/*!*****************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/style.scss ***! - \*****************************************************************************************************************************************************************************************************************************************************/ +/*!*******************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/style.scss ***! + \*******************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied both on the front of your site * and in the editor. @@ -12,9 +12,9 @@ color: #fff; padding: 2px; } -/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/nested-children/style.scss ***! - \*********************************************************************************************************************************************************************************************************************************************************************/ +/*!***********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/__nested-parent/nested-children/style.scss ***! + \***********************************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied both on the front of your site * and in the editor. diff --git a/build/__nested-parent/style-index.css.map b/build/__nested-parent/style-index.css.map new file mode 100644 index 0000000..b6734c5 --- /dev/null +++ b/build/__nested-parent/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"__nested-parent/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C;;;;ACVA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/__nested-parent/style.scss","webpack://test-de-block/./src/__nested-parent/nested-children/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n","/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/blocka/index.asset.php b/build/blocka/index.asset.php deleted file mode 100644 index 1b36e37..0000000 --- a/build/blocka/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'b7e686b40ba1e85010f1'); diff --git a/build/blocka/index.css.map b/build/blocka/index.css.map deleted file mode 100644 index 1733f51..0000000 --- a/build/blocka/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"blocka/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/blocka/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/blocka/index.js.map b/build/blocka/index.js.map deleted file mode 100644 index a26ba70..0000000 --- a/build/blocka/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"blocka/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAUJ;AACV;AACR,SAASS,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAS,CAAC,GAAGF,UAAU;EAC/B,OACCG,iEAAA,CAACV,6DAAQ,EAAAW,0EAAA,KACJb,sEAAa,CAAC,CAAC;IACnBc,SAAS,EAAC,uCAAuC;IACjDC,QAAQ,EAAGC,KAAK,IAAKN,aAAa,CAAC;MAAEC,QAAQ,EAAEK;IAAM,CAAC,CAAE;IACxDA,KAAK,EAAEL,QAAS;IAChBM,WAAW,EAAElB,mDAAE,CAAC,qBAAqB,EAAE,YAAY,CAAE;IACrDmB,OAAO,EAAC,IAAI;IACZC,cAAc,EAAE;E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ACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/blocka/edit.js","webpack://test-de-block/./src/blocka/index.js","webpack://test-de-block/./src/blocka/save.js","webpack://test-de-block/./src/blocka/editor.scss?2675","webpack://test-de-block/./src/blocka/style.scss?2cad","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { montexte } = attributes;\n\treturn (\n\t\t setAttributes({ montexte: value })}\n\t\t\tvalue={montexte}\n\t\t\tplaceholder={__(\"Votre Text Monsieur\", \"mon-espace\")}\n\t\t\ttagName=\"h2\"\n\t\t\tallowedFormats={[]}\n\t\t/>\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport save from \"./save\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { montexte } = attributes;\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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\"blocka/index\": 0,\n\t\"blocka/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"blocka/style-index\"], () => (__webpack_require__(\"./src/blocka/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","montexte","createElement","_extends","className","onChange","value","placeholder","tagName","allowedFormats","registerBlockType","save","metadata","name","edit","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/blocka/style-index.css.map b/build/blocka/style-index.css.map deleted file mode 100644 index 0431d56..0000000 --- a/build/blocka/style-index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"blocka/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/blocka/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/chapter-header/block.json b/build/chapter-header/block.json index d01422a..83b6149 100644 --- a/build/chapter-header/block.json +++ b/build/chapter-header/block.json @@ -1,16 +1,16 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 2, - "name": "homegrade-multiple/chapter-header", + "name": "homegrade-content-blocks/chapter-header", "version": "0.1.0", "title": "Chapter Header", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": { "background": "#fff", "foreground": "#DF1E1E", "src": "feedback" }, - "description": "Un bloc dynamique qui affiche le titres de chapitre", + "description": "Un bloc automatique pour afficher le bandeau de titrage de la page conseil courante", "supports": { "html": false }, diff --git a/build/chapter-header/index.asset.php b/build/chapter-header/index.asset.php index 24e63a6..9ee2e93 100644 --- a/build/chapter-header/index.asset.php +++ b/build/chapter-header/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '2a0380f0b253e7769922'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '032dbd5efb7ebb659f42'); diff --git a/build/chapter-header/index.js b/build/chapter-header/index.js index dd34668..c859af2 100644 --- a/build/chapter-header/index.js +++ b/build/chapter-header/index.js @@ -60,26 +60,26 @@ function Edit({ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Chargement des donn\xE9es...")); } if (postMainTaxonomy && postTitle && currentGeneralThematique) { - console.log(postMainTaxonomy); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { className: `chapter-header-block bg-${currentGeneralThematiqueSlug}-light` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "chapter-header-block__infos" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { - class: `chapter-header-block__page-thematic-title text-${currentGeneralThematiqueSlug}` - }, postMainTaxonomy.name), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, { + className: `chapter-header-block__page-thematic-title text-${currentGeneralThematiqueSlug}` + }, currentGeneralThematique.name), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, { onChange: value => { editPost({ title: value }); }, value: postTitle, - placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Titre du Bloc", "text-box"), + placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Text de placeholrder du bloc chapter-header", "homegrade-theme__bloks-texte-fonctionnel"), tagName: "h2", allowedFormats: [] - }), postParentTaxonomy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { - href: "" - }, "T\xE9l\xE9charger la brochure ")), currentGeneralThematiqueCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + }), postParentTaxonomy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { + href: "", + className: "cta cta--primary cta--buton" + }, "T\xE9l\xE9charger la brochure", " ")), currentGeneralThematiqueCover && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { className: "chapter-header-block__page-thematic-cover page-thematic-cover", src: `${currentGeneralThematiqueCover.source_url}`, alt: "" @@ -239,7 +239,7 @@ module.exports = window["wp"]["i18n"]; \***************************************/ /***/ ((module) => { -module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-multiple/chapter-header","version":"0.1.0","title":"Chapter Header","category":"wpblock-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Un bloc dynamique qui affiche le titres de chapitre","supports":{"html":false},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"blockTitle":{"type":"string","source":"html","selector":"h2"}}}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/chapter-header","version":"0.1.0","title":"Chapter Header","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Un bloc automatique pour afficher le bandeau de titrage de la page conseil courante","supports":{"html":false},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"blockTitle":{"type":"string","source":"html","selector":"h2"}}}'); /***/ }) diff --git a/build/chapter-header/index.js.map b/build/chapter-header/index.js.map index 492344d..154ada4 100644 --- a/build/chapter-header/index.js.map +++ b/build/chapter-header/index.js.map @@ -1 +1 @@ -{"version":3,"file":"chapter-header/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AASJ;AAWF;AAC0B,CAAC;AACD;AAElC;AACsC;AAE9C,SAASqB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAAA,IAAAC,IAAA;EA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A;;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://test-de-block/./src/chapter-header/edit.js","webpack://test-de-block/./src/chapter-header/index.js","webpack://test-de-block/./utilities.js","webpack://test-de-block/./src/chapter-header/editor.scss","webpack://test-de-block/./src/chapter-header/style.scss","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\n\nimport {\n\tInserter,\n\tInnerBlocks,\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect, useDispatch } from \"@wordpress/data\"; // pour les querry\nimport { useEffect, useState } from \"@wordpress/element\";\n\nimport \"./editor.scss\";\nimport { getThematiqueFamilySlug } from \"../../utilities.js\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { editPost } = useDispatch(\"core/editor\");\n\tconst [cover, setCover] = useState(null);\n\n\tlet postTitle = useSelect((select) =>\n\t\tselect(\"core/editor\").getEditedPostAttribute(\"title\")\n\t);\n\n\tlet postTaxonomies = useSelect((select) =>\n\t\tselect(\"core/editor\").getCurrentPostAttribute(\"thematiques\")\n\t);\n\tlet postMainTaxonomy = useSelect(\n\t\t(select) =>\n\t\t\tselect(\"core\").getEntityRecord(\n\t\t\t\t\"taxonomy\",\n\t\t\t\t\"thematiques\",\n\t\t\t\tpostTaxonomies[0]\n\t\t\t),\n\t\t[postTaxonomies]\n\t);\n\tlet postParentTaxonomy = useSelect(\n\t\t(select) => {\n\t\t\tif (postMainTaxonomy) {\n\t\t\t\treturn select(\"core\").getEntityRecord(\n\t\t\t\t\t\"taxonomy\",\n\t\t\t\t\t\"thematiques\",\n\t\t\t\t\tpostMainTaxonomy.parent\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[postMainTaxonomy]\n\t);\n\tlet currentGeneralThematique = postParentTaxonomy ?? postMainTaxonomy ?? null;\n\n\tlet currentGeneralThematiqueSlug = postParentTaxonomy\n\t\t? getThematiqueFamilySlug(postParentTaxonomy.slug)\n\t\t: postMainTaxonomy\n\t\t? getThematiqueFamilySlug(postMainTaxonomy.slug)\n\t\t: null;\n\tlet currentGeneralThematiqueCover = useSelect(\n\t\t(select) => {\n\t\t\tif (currentGeneralThematique) {\n\t\t\t\treturn select(\"core\").getMedia(\n\t\t\t\t\tcurrentGeneralThematique.acf.taxonomy_pictures.illustration_s\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[currentGeneralThematique]\n\t);\n\n\tif (!postTitle) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t

Chargement des données...

\n\t\t\t
\n\t\t);\n\t}\n\n\tif (postMainTaxonomy && postTitle && currentGeneralThematique) {\n\t\tconsole.log(postMainTaxonomy);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{postMainTaxonomy.name}\n\t\t\t\t\t

\n\n\t\t\t\t\t {\n\t\t\t\t\t\t\teditPost({ title: value });\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvalue={postTitle}\n\t\t\t\t\t\tplaceholder={__(\"Titre du Bloc\", \"text-box\")}\n\t\t\t\t\t\ttagName=\"h2\"\n\t\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{postParentTaxonomy && Télécharger la brochure }\n\t\t\t\t
\n\t\t\t\t{currentGeneralThematiqueCover && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","export function lol(params) {\r\n\tconsole.log(\"lol\" + params);\r\n}\r\n\r\nexport function getThematiqueFamilySlug(thematique_slug) {\r\n\tswitch (thematique_slug) {\r\n\t\tcase \"energie\":\r\n\t\tcase \"urbanisme\":\r\n\t\t\treturn \"energies-urbanisme\";\r\n\r\n\t\tcase \"acoustique\":\r\n\t\tcase \"petites-coproprietes\":\r\n\t\t\treturn \"acoustique-coproprietes\";\r\n\r\n\t\tcase \"isolation\":\r\n\t\tcase \"au-quotidien\":\r\n\t\t\treturn \"isolation-quotidien\";\r\n\r\n\t\tcase \"energies\":\r\n\t\tcase \"urbanisme\":\r\n\t\t\treturn \"energies-urbanisme\";\r\n\r\n\t\tcase \"patrimoine\":\r\n\t\tcase \"renovation\":\r\n\t\t\treturn \"patrimoine-renovation\";\r\n\r\n\t\tcase \"location\":\r\n\t\t\treturn \"location\";\r\n\t}\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","// 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\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"chapter-header/index\": 0,\n\t\"chapter-header/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"chapter-header/style-index\"], () => (__webpack_require__(\"./src/chapter-header/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","Inserter","InnerBlocks","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","useDispatch","useEffect","useState","getThematiqueFamilySlug","Edit","attributes","setAttributes","_ref","editPost","cover","setCover","postTitle","select","getEditedPostAttribute","postTaxonomies","getCurrentPostAttribute","postMainTaxonomy","getEntityRecord","postParentTaxonomy","parent","currentGeneralThematique","currentGeneralThematiqueSlug","slug","currentGeneralThematiqueCover","getMedia","acf","taxonomy_pictures","illustration_s","createElement","console","log","className","class","name","onChange","value","title","placeholder","tagName","allowedFormats","href","src","source_url","alt","registerBlockType","metadata","edit","lol","params","thematique_slug"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"chapter-header/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AASJ;AAWF;AAC0B,CAAC;AACD;AAElC;AACsC;AAE9C,SAASqB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAAA,IAAAC,IAAA;EAC3D,MAAM;IAAEC;EAAS,CAAC,GAAGR,4DAAW,CAAC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A;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/chapter-header/edit.js","webpack://test-de-block/./src/chapter-header/index.js","webpack://test-de-block/./utilities.js","webpack://test-de-block/./src/chapter-header/editor.scss?20cf","webpack://test-de-block/./src/chapter-header/style.scss?53a4","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\n\nimport {\n\tInserter,\n\tInnerBlocks,\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect, useDispatch } from \"@wordpress/data\"; // pour les querry\nimport { useEffect, useState } from \"@wordpress/element\";\n\nimport \"./editor.scss\";\nimport { getThematiqueFamilySlug } from \"../../utilities.js\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { editPost } = useDispatch(\"core/editor\");\n\tconst [cover, setCover] = useState(null);\n\n\tlet postTitle = useSelect((select) =>\n\t\tselect(\"core/editor\").getEditedPostAttribute(\"title\")\n\t);\n\n\tlet postTaxonomies = useSelect((select) =>\n\t\tselect(\"core/editor\").getCurrentPostAttribute(\"thematiques\")\n\t);\n\tlet postMainTaxonomy = useSelect(\n\t\t(select) =>\n\t\t\tselect(\"core\").getEntityRecord(\n\t\t\t\t\"taxonomy\",\n\t\t\t\t\"thematiques\",\n\t\t\t\tpostTaxonomies[0]\n\t\t\t),\n\t\t[postTaxonomies]\n\t);\n\tlet postParentTaxonomy = useSelect(\n\t\t(select) => {\n\t\t\tif (postMainTaxonomy) {\n\t\t\t\treturn select(\"core\").getEntityRecord(\n\t\t\t\t\t\"taxonomy\",\n\t\t\t\t\t\"thematiques\",\n\t\t\t\t\tpostMainTaxonomy.parent\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[postMainTaxonomy]\n\t);\n\tlet currentGeneralThematique = postParentTaxonomy ?? postMainTaxonomy ?? null;\n\n\tlet currentGeneralThematiqueSlug = postParentTaxonomy\n\t\t? getThematiqueFamilySlug(postParentTaxonomy.slug)\n\t\t: postMainTaxonomy\n\t\t? getThematiqueFamilySlug(postMainTaxonomy.slug)\n\t\t: null;\n\n\tlet currentGeneralThematiqueCover = useSelect(\n\t\t(select) => {\n\t\t\tif (currentGeneralThematique) {\n\t\t\t\treturn select(\"core\").getMedia(\n\t\t\t\t\tcurrentGeneralThematique.acf.taxonomy_pictures.illustration_s\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[currentGeneralThematique]\n\t);\n\n\tif (!postTitle) {\n\t\treturn (\n\t\t\t
\n\t\t\t\t

Chargement des données...

\n\t\t\t
\n\t\t);\n\t}\n\n\tif (postMainTaxonomy && postTitle && currentGeneralThematique) {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t{currentGeneralThematique.name}\n\t\t\t\t\t

\n\n\t\t\t\t\t {\n\t\t\t\t\t\t\teditPost({ title: value });\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvalue={postTitle}\n\t\t\t\t\t\tplaceholder={__(\n\t\t\t\t\t\t\t\"Text de placeholrder du bloc chapter-header\",\n\t\t\t\t\t\t\t\"homegrade-theme__bloks-texte-fonctionnel\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\ttagName=\"h2\"\n\t\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{postParentTaxonomy && (\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\tTélécharger la brochure{\" \"}\n\t\t\t\t\t\t

\n\t\t\t\t\t)}\n\t\t\t\t
\n\t\t\t\t{currentGeneralThematiqueCover && (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t);\n\t}\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","export function lol(params) {\r\n\tconsole.log(\"lol\" + params);\r\n}\r\n\r\nexport function getThematiqueFamilySlug(thematique_slug) {\r\n\tswitch (thematique_slug) {\r\n\t\tcase \"energie\":\r\n\t\tcase \"urbanisme\":\r\n\t\t\treturn \"energies-urbanisme\";\r\n\r\n\t\tcase \"acoustique\":\r\n\t\tcase \"petites-coproprietes\":\r\n\t\t\treturn \"acoustique-coproprietes\";\r\n\r\n\t\tcase \"isolation\":\r\n\t\tcase \"au-quotidien\":\r\n\t\t\treturn \"isolation-quotidien\";\r\n\r\n\t\tcase \"energies\":\r\n\t\tcase \"urbanisme\":\r\n\t\t\treturn \"energies-urbanisme\";\r\n\r\n\t\tcase \"patrimoine\":\r\n\t\tcase \"renovation\":\r\n\t\t\treturn \"patrimoine-renovation\";\r\n\r\n\t\tcase \"location\":\r\n\t\t\treturn \"location\";\r\n\t}\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","// 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\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"chapter-header/index\": 0,\n\t\"chapter-header/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"chapter-header/style-index\"], () => (__webpack_require__(\"./src/chapter-header/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","Inserter","InnerBlocks","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","useDispatch","useEffect","useState","getThematiqueFamilySlug","Edit","attributes","setAttributes","_ref","editPost","cover","setCover","postTitle","select","getEditedPostAttribute","postTaxonomies","getCurrentPostAttribute","postMainTaxonomy","getEntityRecord","postParentTaxonomy","parent","currentGeneralThematique","currentGeneralThematiqueSlug","slug","currentGeneralThematiqueCover","getMedia","acf","taxonomy_pictures","illustration_s","createElement","className","name","onChange","value","title","placeholder","tagName","allowedFormats","href","src","source_url","alt","registerBlockType","metadata","edit","lol","params","console","log","thematique_slug"],"sourceRoot":""} \ No newline at end of file diff --git a/build/chapter-header/render.php b/build/chapter-header/render.php index e3c01cc..a4e9ccc 100644 --- a/build/chapter-header/render.php +++ b/build/chapter-header/render.php @@ -4,28 +4,60 @@ // print_r($block); // echo ''; -$thematique = get_the_terms(get_the_ID(), 'thematiques')[0]; +$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null; $thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique; $thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale->term_id)['illustration_s']; +$lastUpdate = get_the_modified_date('', get_the_ID()); +$args = array( + // 'fields' => 'ids', + 'post_type' => 'brochures', + 'posts_per_page' => 1, + 'tax_query' => array( + array( + 'taxonomy' => 'thematiques', + 'field' => 'term_id', + 'terms' => $thematique->term_id + ) + ) +); +$relatedBrochuresPosts = get_posts($args); +$relatedBrochure = get_field('brochures', $relatedBrochuresPosts[0]->ID); +$hasBrochure = $relatedBrochure['file_fr']['url'] ? true : false; -echo '
';
-// print_r(getThematiqueFamilySlug($thematique->slug));
-// print_r(getThematiqueFamilySlug("acoustique"));
-// print_r("salut");
-// print_r($thematique);
-// print_r($thematique_generale);
-// print_r($thematique_picture);
-echo '
'; +// echo '
';
+// // print_r($relatedBrochures[0]);
+// // print_r($relatedBrochure['file_fr']['url'] ? "yes" : "no");
+// // print_r(getThematiqueFamilySlug("acoustique"));
+// // print_r("salut");
+// // print_r($thematique);
+// // print_r($thematique_generale);
+// // print_r($thematique_picture);
+// echo '
'; ?> -
slug) . "-light" ?>">
-

slug) ?>">name ?>

+ parent == 0) : ?> + +

slug) ?>">

+ +

slug) ?>">name ?>

+ + +

- Télécharger la brochure + + + Télécharger la brochure post_title ?> + + + + + + +
\ No newline at end of file diff --git a/build/chapter-header/style-index.css b/build/chapter-header/style-index.css index 0fb15b9..03ee145 100644 --- a/build/chapter-header/style-index.css +++ b/build/chapter-header/style-index.css @@ -11,6 +11,7 @@ display: flex; justify-content: space-between; align-items: center; + margin-bottom: 20px; } .chapter-header-block__page-thematic-cover { max-width: 400px; diff --git a/build/chapter-header/style-index.css.map b/build/chapter-header/style-index.css.map index 111d618..5279291 100644 --- a/build/chapter-header/style-index.css.map +++ b/build/chapter-header/style-index.css.map @@ -1 +1 @@ -{"version":3,"file":"chapter-header/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD;AAEC;EACC;AAAF,C","sources":["webpack://test-de-block/./src/chapter-header/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.chapter-header-block {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\n\t&__page-thematic-cover {\n\t\tmax-width: 400px;\n\t}\n\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"chapter-header/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AAAD;AAEC;EACC;AAAF,C","sources":["webpack://test-de-block/./src/chapter-header/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.chapter-header-block {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tmargin-bottom: 20px;\n\t\n\t&__page-thematic-cover {\n\t\tmax-width: 400px;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/content-heading/block.json b/build/content-heading/block.json new file mode 100644 index 0000000..9c2e455 --- /dev/null +++ b/build/content-heading/block.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "homegrade-content-blocks/content-heading", + "version": "0.1.0", + "title": "Titre", + "category": "homegrade-blocks", + "icon": "smiley", + "description": "Bloc de titrage", + "supports": { + "html": false + }, + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "attributes": { + "title": { + "type": "string", + "source": "html", + "selector": "h3" + } + } +} \ No newline at end of file diff --git a/build/content-heading/index.asset.php b/build/content-heading/index.asset.php new file mode 100644 index 0000000..366dcd5 --- /dev/null +++ b/build/content-heading/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'e705b01d84e7792bd413'); diff --git a/build/content-heading/index.css b/build/content-heading/index.css new file mode 100644 index 0000000..320e074 --- /dev/null +++ b/build/content-heading/index.css @@ -0,0 +1,10 @@ +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/content-heading/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/build/content-heading/index.css.map b/build/content-heading/index.css.map new file mode 100644 index 0000000..81686dd --- /dev/null +++ b/build/content-heading/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"content-heading/index.css","mappings":";;;AAAA;;;;EAAA,C","sources":["webpack://test-de-block/./src/content-heading/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n// .block-editor-image-size-control {\n// \tdisplay: none;\n// }\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/content-heading/index.js b/build/content-heading/index.js new file mode 100644 index 0000000..74c819c --- /dev/null +++ b/build/content-heading/index.js @@ -0,0 +1,380 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/content-heading/edit.js": +/*!*************************************!*\ + !*** ./src/content-heading/edit.js ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Edit) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* 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 _editor_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./editor.scss */ "./src/content-heading/editor.scss"); + + + + + +function Edit({ + attributes, + setAttributes +}) { + const { + title + } = attributes; + const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(); + function onChangeCitation(newCitation) { + setAttributes({ + citation: newCitation + }); + } + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.AlignmentToolbar, { + align: "right", + onChange: onChangeCitation + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, { + className: "wp-block-homegrade-content-blocks-content-heading", + onChange: value => setAttributes({ + title: value + }), + value: title, + placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Insérez votre titre ici", "homegrade-theme__bloks-texte-fonctionnel"), + tagName: "h3" + })); +} + +/***/ }), + +/***/ "./src/content-heading/index.js": +/*!**************************************!*\ + !*** ./src/content-heading/index.js ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./style.scss */ "./src/content-heading/style.scss"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/content-heading/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/content-heading/save.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./block.json */ "./src/content-heading/block.json"); + + + + + + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_5__.name, { + icon: { + src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 24 24", + width: "24", + height: "24", + "aria-hidden": "true", + focusable: "false" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "M6.2 5.2v13.4l5.8-4.8 5.8 4.8V5.2z" + })), + foreground: "#DF1E1E" + }, + edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"], + save: _save__WEBPACK_IMPORTED_MODULE_4__["default"] +}); + +/***/ }), + +/***/ "./src/content-heading/save.js": +/*!*************************************!*\ + !*** ./src/content-heading/save.js ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ save) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); + + +function save({ + attributes +}) { + const { + title + } = attributes; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, { + tagName: "h3", + value: title, + className: "wp-block-homegrade-content-blocks-content-heading" + })); +} + +/***/ }), + +/***/ "./src/content-heading/editor.scss": +/*!*****************************************!*\ + !*** ./src/content-heading/editor.scss ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/content-heading/style.scss": +/*!****************************************!*\ + !*** ./src/content-heading/style.scss ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "@wordpress/block-editor": +/*!*************************************!*\ + !*** external ["wp","blockEditor"] ***! + \*************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blockEditor"]; + +/***/ }), + +/***/ "@wordpress/blocks": +/*!********************************!*\ + !*** external ["wp","blocks"] ***! + \********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blocks"]; + +/***/ }), + +/***/ "@wordpress/components": +/*!************************************!*\ + !*** external ["wp","components"] ***! + \************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["components"]; + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["element"]; + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["i18n"]; + +/***/ }), + +/***/ "./src/content-heading/block.json": +/*!****************************************!*\ + !*** ./src/content-heading/block.json ***! + \****************************************/ +/***/ ((module) => { + +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/content-heading","version":"0.1.0","title":"Titre","category":"homegrade-blocks","icon":"smiley","description":"Bloc de titrage","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"title":{"type":"string","source":"html","selector":"h3"}}}'); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "content-heading/index": 0, +/******/ "content-heading/style-index": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = globalThis["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module depends on other loaded chunks and execution need to be delayed +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["content-heading/style-index"], () => (__webpack_require__("./src/content-heading/index.js"))) +/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ +/******/ })() +; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/content-heading/index.js.map b/build/content-heading/index.js.map new file mode 100644 index 0000000..760f5b8 --- /dev/null +++ b/build/content-heading/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"content-heading/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAWJ;AAOF;AAER;AAER,SAASc,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAM,CAAC,GAAGF,UAAU;EAC5B,MAAMG,UAAU,GAAGjB,sEAAa,CAAC,CAAC;EAElC,SAASkB,gBAAgBA,CAACC,WAAW,EAAE;IACtCJ,aAAa,CAAC;MAAEK,QAAQ,EAAED;IAAY,CAAC,CAAC;EACzC;EAEA,OACCE,iEAAA,CAAAC,wDAAA,QACCD,iEAAA,CAAChB,kEAAa,QACbgB,iEAAA,CAACjB,qEAAgB;IAACmB,KAAK,EAAC,OAAO;IAACC,QAAQ,EAAEN;EAAiB,CAAE,CAC/C,CAAC,EAEhBG,iEAAA,CAACnB,6DAAQ;IACRuB,SAAS,EAAC,mDAAmD;IAC7DD,QAAQ,EAAGE,KAAK,IAAKX,aAAa,CAAC;MAAEC,KAAK,EAAEU;IAAM,CAAC,CAAE;IACrDA,KAAK,EAAEV,KAAM;IACbW,WAAW,EAAE5B,mDAAE,CACd,yBAAyB,EACzB,0CACD,CAAE;IACF6B,OAAO,EAAC;EAAI,CACZ,CACA,CAAC;AAEL;;;;;;;;;;;;;;;;;;;;AChDsD;AAEhC;AAEI;AACA;AACU;AAEpCC,oEAAiB,CAACE,6CAAa,EAAE;EAChCE,IAAI,EAAE;IACLC,GAAG,EACFb,iEAAA;MACCc,KAAK,EAAC,4BAA4B;MAClCC,OAAO,EAAC,WAAW;MACnBC,KAAK,EAAC,IAAI;MACVC,MAAM,EAAC,IAAI;MACX,eAAY,MAAM;MAClBC,SAAS,EAAC;IAAO,GAEjBlB,iEAAA;MAAMmB,CAAC,EAAC;IAAoC,CAAO,CAC/C,CACL;IACDC,UAAU,EAAE;EACb,CAAC;EACDC,IAAI,EAAE7B,6CAAI;EAC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WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/content-heading/edit.js","webpack://test-de-block/./src/content-heading/index.js","webpack://test-de-block/./src/content-heading/save.js","webpack://test-de-block/./src/content-heading/editor.scss?0f9d","webpack://test-de-block/./src/content-heading/style.scss?ab3a","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\n\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToggleControl,\n\tTextControl,\n\tColorPalette,\n\tColorPicker,\n} from \"@wordpress/components\";\n\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { title } = attributes;\n\tconst blockProps = useBlockProps();\n\n\tfunction onChangeCitation(newCitation) {\n\t\tsetAttributes({ citation: newCitation });\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t setAttributes({ title: value })}\n\t\t\t\tvalue={title}\n\t\t\t\tplaceholder={__(\n\t\t\t\t\t\"Insérez votre titre ici\",\n\t\t\t\t\t\"homegrade-theme__bloks-texte-fonctionnel\"\n\t\t\t\t)}\n\t\t\t\ttagName=\"h3\"\n\t\t\t/>\n\t\t\n\t);\n}\n","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\n\t\t),\n\t\tforeground: \"#DF1E1E\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { title } = attributes;\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"content-heading/index\": 0,\n\t\"content-heading/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"content-heading/style-index\"], () => (__webpack_require__(\"./src/content-heading/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","PanelBody","ToggleControl","TextControl","ColorPalette","ColorPicker","Edit","attributes","setAttributes","title","blockProps","onChangeCitation","newCitation","citation","createElement","Fragment","align","onChange","className","value","placeholder","tagName","registerBlockType","save","metadata","name","icon","src","xmlns","viewBox","width","height","focusable","d","foreground","edit","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/content-heading/style-index.css b/build/content-heading/style-index.css new file mode 100644 index 0000000..d2a4179 --- /dev/null +++ b/build/content-heading/style-index.css @@ -0,0 +1,61 @@ +/*!*******************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/content-heading/style.scss ***! + \*******************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ +.wpblock-citation-block { + position: relative; + padding: 80px 20px; + margin-top: 50px !important; + margin-bottom: 50px !important; +} +.wpblock-citation-block .wpblock-citation-citation { + font-weight: 600; + font-size: 50px; + line-height: 1.2; + text-transform: unset; + padding-bottom: 50px; +} +.wpblock-citation-block .wpblock-citation-author { + padding-top: 20px; +} +.wpblock-citation-block .wpblock-citation-citation, +.wpblock-citation-block .wpblock-citation-author { + max-width: 1040px; + margin: 0; +} +.wpblock-citation-block.text-align-right { + padding-right: 50px; + text-align: right; +} +.wpblock-citation-block.text-align-right .wpblock-citation-citation, +.wpblock-citation-block.text-align-right .wpblock-citation-author { + margin-left: auto; +} +.wpblock-citation-block.text-align-left { + padding-left: 50px; + text-align: left; +} +.wpblock-citation-block.text-align-center { + text-align: center; +} +.wpblock-citation-block.text-align-center .wpblock-citation-citation, +.wpblock-citation-block.text-align-center .wpblock-citation-author { + margin: 0 auto; +} +.wpblock-citation-block figure, +.wpblock-citation-block img { + width: 100%; + height: 250px; +} +.wpblock-citation-block img { + -o-object-fit: cover; + object-fit: cover; + filter: brightness(0.3) grayscale(100%) sepia(100%) hue-rotate(200deg) opacity(0.5); +} + +/*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file diff --git a/build/content-heading/style-index.css.map b/build/content-heading/style-index.css.map new file mode 100644 index 0000000..9a770eb --- /dev/null +++ b/build/content-heading/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"content-heading/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;EACA;AAAD;AAEC;EACC;EACA;EACA;EACA;EACA;AAAF;AAEC;EACC;AAAF;AAGC;;EAEC;EACA;AADF;AAIC;EACC;EACA;AAFF;AAGE;;EAEC;AADH;AAIC;EACC;EACA;AAFF;AAIC;EACC;AAFF;AAIE;;EAEC;AAFH;AAMC;;EAEC;EACA;AAJF;AAMC;EACC;KAAA;EACA;AAJF,C","sources":["webpack://test-de-block/./src/content-heading/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wpblock-citation-block {\n\tposition: relative;\n\tpadding: 80px 20px;\n\tmargin-top: 50px !important;\n\tmargin-bottom: 50px !important;\n\n\t.wpblock-citation-citation {\n\t\tfont-weight: 600;\n\t\tfont-size: 50px;\n\t\tline-height: 1.2;\n\t\ttext-transform: unset;\n\t\tpadding-bottom: 50px;\n\t}\n\t.wpblock-citation-author {\n\t\tpadding-top: 20px;\n\t}\n\n\t.wpblock-citation-citation,\n\t.wpblock-citation-author {\n\t\tmax-width: 1040px;\n\t\tmargin: 0;\n\t}\n\n\t&.text-align-right {\n\t\tpadding-right: 50px;\n\t\ttext-align: right;\n\t\t.wpblock-citation-citation,\n\t\t.wpblock-citation-author {\n\t\t\tmargin-left: auto;\n\t\t}\n\t}\n\t&.text-align-left {\n\t\tpadding-left: 50px;\n\t\ttext-align: left;\n\t}\n\t&.text-align-center {\n\t\ttext-align: center;\n\n\t\t.wpblock-citation-citation,\n\t\t.wpblock-citation-author {\n\t\t\tmargin: 0 auto;\n\t\t}\n\t}\n\n\tfigure,\n\timg {\n\t\twidth: 100%;\n\t\theight: 250px;\n\t}\n\timg {\n\t\tobject-fit: cover;\n\t\tfilter: brightness(0.3) grayscale(100%) sepia(100%) hue-rotate(200deg)\n\t\t\topacity(0.5);\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/dynamic-posts/index.css.map b/build/dynamic-posts/index.css.map deleted file mode 100644 index 6478ae9..0000000 --- a/build/dynamic-posts/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dynamic-posts/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/dynamic-posts/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/dynamic-posts/index.js.map b/build/dynamic-posts/index.js.map deleted file mode 100644 index f785e46..0000000 --- a/build/dynamic-posts/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dynamic-posts/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAMJ;AAWF;AACa,CAAC;AACtB;AAER,SAASe,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,OACCC,iEAAA,CAAAC,wDAAA,QACCD,iEAAA,YAAG,MAAO,CACT,CAAC;AAEL;;;;;;;;;;;;;;;;AC3BsD;AAEhC;AAEI;AACU;AAEpCE,oEAAiB,CAACC,6CAAa,EAAE;EAChCE,IAAI,EAAER,6CAAIA;AACX,CAAC,CAAC;;;;;;;;;;;ACTF;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/dynamic-posts/edit.js","webpack://test-de-block/./src/dynamic-posts/index.js","webpack://test-de-block/./src/dynamic-posts/editor.scss?9651","webpack://test-de-block/./src/dynamic-posts/style.scss?370d","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\treturn (\n\t\t<>\n\t\t\t

test

\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","// extracted by mini-css-extract-plugin\nexport {};","// 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\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"dynamic-posts/index\": 0,\n\t\"dynamic-posts/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"dynamic-posts/style-index\"], () => (__webpack_require__(\"./src/dynamic-posts/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","Edit","attributes","setAttributes","createElement","Fragment","registerBlockType","metadata","name","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/build/dynamic-posts/style-index.css.map b/build/dynamic-posts/style-index.css.map deleted file mode 100644 index 917f8ed..0000000 --- a/build/dynamic-posts/style-index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dynamic-posts/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/dynamic-posts/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/images/icon_feather_key.26c1f367.png b/build/images/icon_feather_key.26c1f367.png new file mode 100644 index 0000000000000000000000000000000000000000..b909ba2f4f3ed04ef111676806eeb97f6f1d4ae8 GIT binary patch literal 8389 zcmXYVcRbtQ_y0@OCRSsX65Y0L^+@hH_n!Ma=XvhybrNkrwKqEHC&>!{c zh(l@a$etOgGPV2uwQCpv7sAo@vY6(xyadn@ENseMkumhhi!jz~4dc$|6Z9H6F^lhR zG&(+ri!qBgwvgMtJX=y961YPq|Ni>Bm6T078^(+O0xYWo9gb980I*Am2?+JU-#??Mb_XDU$As7www{H*;mvy2OaOrtU>?p! zVxUMi0D8rYdM^UKTmas%_CI7Un-*o5-5O- z8|qge$}ND6ahQP!gwO%J!zshXE)c3Hu%;iR)FIe5D!?xhmCUSc17I^$LMhyypFpxI%`tkVfi;ZccJ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Anyx!c1@L|L!ym>JP)Y~8fE%a;rOZTwZ`YKV}UwHmsmhOrWLSIvz%{W`$`ii#NQmb_1tYvNyhDf|4LbSG5LVANpvk88z99_yEqsVlJ zi8L+3aZx@fWqwN}$*iN}YowoGdQ7j3>vlVSBq$2zOZ_%o_|Wf4h)%r6OP>OZ=yEx0 z-}qpK{{${c>>0Gs*4Q~kQvo}y)4wc4D9)1O8j4f!s)NkSFr;!oCF{AA9DdPqU;YRG z-UCGFm%3jM5b5uQKC}z?yuM4CRRfpX?L(m0R4_uU-?ZIe zGTvLp6!tTSW?r9u7PKI?l-b1GdmHTO;?SzE*i({XKd@wcF1Uz)`q);lOzGw4#;>6w zeN|%*I}(@gNpJn6_4dBg)Y|eGRpS{psx2zxk`Y4_{oIFeF|1ytk<-m{V?=5hN-!bK zhI{ed?dmxbRY8eLyJSqsU!Pu2enrV}T<diC{>)$N=;2Cy<&%U2vCXnQ&SzJdk z3LLwiRb1xzPx8&Fbu|k=vFjq010nn;(xl1ZidRjz-poAjtr0M zz98C~>g}a*52lXRG?S`usZ`KX6vufn1u;%1SrL!Te>#`9$0LDTLp)l=`^l*Xd@{%Z zhfa`MFd6C@9>=0p*)uDM&%K9xX2iEwPjd>Zz@^uu&7&uJVvlc0+n~le9X9c&i#*x9 z33J-Djg-VVHobMc0+st?!`n~UANG|}bL?*ZAYRh-%_|9T7r0u)k0MlC@^63AW$|8N zjlw2)@fpdb$>ZGia76E2_RdRgEQhsEQa9hxzo8YG|5_6*9FfD{>Lu@!tvf8QQ}x+Z zi;=FO>wLidlVHBFXh-mbS`)PVMFzBDME)yz@BC2I}_jZ97AL6b(ABvCqYo8)^g!YIc z@Vi0Gp)ee;z*zOk46r7=%h$RHL-DaT0lORovj(ba#_A>y2HwW38liLHT28Mp array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '69f74138a4f35373ed87'); diff --git a/build/nested-parent/index.css.map b/build/nested-parent/index.css.map deleted file mode 100644 index e5f6cfd..0000000 --- a/build/nested-parent/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nested-parent/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C;;;;ACPA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/nested-parent/nested-children/editor.scss","webpack://test-de-block/./src/nested-parent/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n","/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/index.js.map b/build/nested-parent/index.js.map deleted file mode 100644 index fb14fd9..0000000 --- a/build/nested-parent/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nested-parent/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAWJ;AACV;AACR,SAASU,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC;EAAS,CAAC,GAAGF,UAAU;EAC/B,OACCG,iEAAA,YAAAC,0EAAA,KACKd,sEAAa,CAAC,CAAC;IACnBe,SAAS,EAAC;EAAuC,IAEjDF,iEAAA,CAACX,6DAAQ;IACRc,QAAQ,EAAGC,KAAK,IAAKN,aAAa,CAAC;MAAEC,QAAQ,EAAEK;IAAM,CAAC,CAAE;IACxDA,KAAK,EAAEL,QAAS;IAChBM,WAAW,EAAEnB,mDAAE,CAAC,sBAAsB,EAAE,YAAY,CAAE;IACtDoB,OAAO,EAAC,IAAI;IACZC,cAAc,EAAE;EAAG,CACnB,CAAC,EACFP,iEAAA,CAACZ,gEAAW;IACXoB,aAAa,EAAE,CACd,mCAAmC,EACnC,gBAAgB,EAChB,cAAc;IAEf;IACA;IACA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ACAA;;;;;;;;;;;;;;ACAe;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;UCbA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/nested-parent/edit.js","webpack://test-de-block/./src/nested-parent/index.js","webpack://test-de-block/./src/nested-parent/nested-children/edit.js","webpack://test-de-block/./src/nested-parent/nested-children/index.js","webpack://test-de-block/./src/nested-parent/nested-children/save.js","webpack://test-de-block/./src/nested-parent/save.js","webpack://test-de-block/./src/nested-parent/editor.scss?1d36","webpack://test-de-block/./src/nested-parent/nested-children/editor.scss?f190","webpack://test-de-block/./src/nested-parent/nested-children/style.scss?4f7e","webpack://test-de-block/./src/nested-parent/style.scss?a28b","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInserter,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { montexte } = attributes;\n\treturn (\n\t\t\n\t\t\t setAttributes({ montexte: value })}\n\t\t\t\tvalue={montexte}\n\t\t\t\tplaceholder={__(\"PARENT SECTION TITLE\", \"mon-espace\")}\n\t\t\t\ttagName=\"h2\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport { __ } from \"@wordpress/i18n\";\nimport \"./style.scss\";\n\nimport \"./nested-children\";\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\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#0414eb\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t
\n\t\t\t setAttributes({ userName: value })}\n\t\t\t\tvalue={userName}\n\t\t\t\tplaceholder={__(\"UserName Here\", \"text-box\")}\n\t\t\t\ttagName=\"p\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\n\t\t\t

{userPosition}

\n\t\t
\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: \"smiley\",\n\tcategory: \"wpblock-blocks\",\n\tparent: [\"wpblocks-multiple/nested-parent\"],\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t\n\t);\n}\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { montexte } = attributes;\n\n\treturn (\n\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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\"nested-parent/index\": 0,\n\t\"nested-parent/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"nested-parent/style-index\"], () => (__webpack_require__(\"./src/nested-parent/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","Inserter","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","montexte","createElement","_extends","className","onChange","value","placeholder","tagName","allowedFormats","allowedBlocks","registerBlockType","save","metadata","name","icon","src","id","xmlns","viewBox","d","foreground","edit","userName","userPosition","Save","title","category","parent","supports","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/nested-children/index.asset.php b/build/nested-parent/nested-children/index.asset.php deleted file mode 100644 index 4d29bc7..0000000 --- a/build/nested-parent/nested-children/index.asset.php +++ /dev/null @@ -1 +0,0 @@ - array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'c7951a21a6ac6bb8b92d'); diff --git a/build/nested-parent/nested-children/index.css.map b/build/nested-parent/nested-children/index.css.map deleted file mode 100644 index 61a39a5..0000000 --- a/build/nested-parent/nested-children/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nested-parent/nested-children/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/nested-parent/nested-children/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/nested-children/index.js.map b/build/nested-parent/nested-children/index.js.map deleted file mode 100644 index fa51303..0000000 --- a/build/nested-parent/nested-children/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nested-parent/nested-children/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAqC;AAUJ;AACV;AACR,SAASS,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAGH,UAAU;EAC7C,OACCI,iEAAA,YAAab,kEAAa,EACzBa,iEAAA,CAACX,6DAAQ;IACRY,SAAS,EAAC,WAAW;IACrBC,QAAQ,EAAGC,KAAK,IAAKN,aAAa,CAAC;MAAEC,QAAQ,EAAEK;IAAM,CAAC,CAAE;IACxDA,KAAK,EAAEL,QAAS;IAChBM,WAAW,EAAElB,mDAAE,CAAC,eAAe,EAAE,UAAU,CAAE;IAC7CmB,OAAO,EAAC,GAAG;IACXC,cAAc,EAAE;EAAG,CACnB,CAAC,EAEFN,iEAAA,YAAID,YAAgB,CACZ,CAAC;AAEZ;;;;;;;;;;;;;;;;;AC5BsD;AAChC;AACc;AAEV;AACA;AAE1BQ,oEAAiB,CAACC,6CAAa,EAAE;EAChCG,KAAK,EAAEH,8CAAc;EACrBI,IAAI,EAAE,QAAQ;EACdC,QAAQ,EAAE,gBAAgB;EAC1BC,MAAM,EAAE,CAAC,iCAAiC,CAAC;EAC3CC,QAAQ,EAA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BAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/nested-parent/nested-children/edit.js","webpack://test-de-block/./src/nested-parent/nested-children/index.js","webpack://test-de-block/./src/nested-parent/nested-children/save.js","webpack://test-de-block/./src/nested-parent/nested-children/editor.scss?f190","webpack://test-de-block/./src/nested-parent/nested-children/style.scss?4f7e","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t
\n\t\t\t setAttributes({ userName: value })}\n\t\t\t\tvalue={userName}\n\t\t\t\tplaceholder={__(\"UserName Here\", \"text-box\")}\n\t\t\t\ttagName=\"p\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\n\t\t\t

{userPosition}

\n\t\t
\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: \"smiley\",\n\tcategory: \"wpblock-blocks\",\n\tparent: [\"wpblocks-multiple/nested-parent\"],\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"nested-parent/nested-children/index\": 0,\n\t\"nested-parent/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"nested-parent/style-index\"], () => (__webpack_require__(\"./src/nested-parent/nested-children/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","userName","userPosition","createElement","className","onChange","value","placeholder","tagName","allowedFormats","registerBlockType","metadata","Save","name","title","icon","category","parent","supports","edit","save","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/style-index.css.map b/build/nested-parent/style-index.css.map deleted file mode 100644 index 6ca6c1c..0000000 --- a/build/nested-parent/style-index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nested-parent/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C;;;;ACVA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/nested-parent/style.scss","webpack://test-de-block/./src/nested-parent/nested-children/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n","/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/points-cles/block.json b/build/points-cles/block.json new file mode 100644 index 0000000..ab6bf38 --- /dev/null +++ b/build/points-cles/block.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "homegrade-content-blocks/points-cles", + "version": "0.1.0", + "title": "Points clés", + "category": "homegrade-blocks", + "description": "Bloc de points-cles", + "supports": { + "html": false + }, + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "render": "file:./render.php", + "attributes": { + "currentGeneralThematiqueSlug": { + "type": "string", + "default": "" + }, + "postTaxonomy": { + "type": "string", + "default": "isolation" + } + } +} \ No newline at end of file diff --git a/build/points-cles/index.asset.php b/build/points-cles/index.asset.php new file mode 100644 index 0000000..581f884 --- /dev/null +++ b/build/points-cles/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '05d6955f1f1abaca6f02'); diff --git a/build/points-cles/index.css b/build/points-cles/index.css new file mode 100644 index 0000000..8417702 --- /dev/null +++ b/build/points-cles/index.css @@ -0,0 +1,37 @@ +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/nested-children/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ +.wp-block-create-block-blocka { + border: 1px dotted #f00; +} +/*!****************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/editor.scss ***! + \****************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ +.wp-block-homegrade-content-blocks-points-cles ul li { + list-style: none !important; + display: flex; + padding: 10px 0; +} +.wp-block-homegrade-content-blocks-points-cles ul li:before { + transform: translateY(6px); + flex-shrink: 0; + border-radius: 50%; + content: ""; + width: 10px; + height: 10px; + display: inline-block; + background-color: red; + margin-right: 10px; +} + +/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/build/points-cles/index.css.map b/build/points-cles/index.css.map new file mode 100644 index 0000000..1c315db --- /dev/null +++ b/build/points-cles/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"points-cles/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C;;;;ACPA;;;;EAAA;AAQE;EACC;EACA;EACA;AAFH;AAIE;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAFH,C","sources":["webpack://test-de-block/./src/points-cles/nested-children/editor.scss","webpack://test-de-block/./src/points-cles/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n","/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-homegrade-content-blocks-points-cles {\n\tul {\n\t\tli {\n\t\t\tlist-style: none !important;\n\t\t\tdisplay: flex;\n\t\t\tpadding: 10px 0;\n\t\t}\n\t\tli:before {\n\t\t\ttransform: translateY(6px);\n\t\t\tflex-shrink: 0;\n\t\t\tborder-radius: 50%;\n\t\t\tcontent: \"\";\n\t\t\twidth: 10px;\n\t\t\theight: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tbackground-color: red;\n\t\t\tmargin-right: 10px;\n\t\t}\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/points-cles/index.js b/build/points-cles/index.js new file mode 100644 index 0000000..7f84954 --- /dev/null +++ b/build/points-cles/index.js @@ -0,0 +1,610 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/points-cles/edit.js": +/*!*********************************!*\ + !*** ./src/points-cles/edit.js ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Edit) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/points-cles/editor.scss"); +/* harmony import */ var _img_icon_feather_key_png__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./img/icon_feather_key.png */ "./src/points-cles/img/icon_feather_key.png"); + + + + + + +function Edit({ + attributes, + setAttributes +}) { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { + className: "wp-block-homegrade-content-blocks-points-cles" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "wp-block-homegrade-content-blocks-points-cles__titling" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { + className: "icon" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { + src: _img_icon_feather_key_png__WEBPACK_IMPORTED_MODULE_4__ + })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Les points clés", "homegrade-theme__bloks-texte-fonctionnel"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InnerBlocks, { + allowedBlocks: ["core/list", "core/paragraph", "core/heading", "wpblocks-multiple/nested-children"], + template: [["core/paragraph"], ["core/list"]] + }))); +} + +/***/ }), + +/***/ "./src/points-cles/index.js": +/*!**********************************!*\ + !*** ./src/points-cles/index.js ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./style.scss */ "./src/points-cles/style.scss"); +/* harmony import */ var _nested_children__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nested-children */ "./src/points-cles/nested-children/index.js"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/points-cles/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./save */ "./src/points-cles/save.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block.json */ "./src/points-cles/block.json"); + + + + + + + + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_7__.name, { + icon: { + src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { + id: "Calque_2", + xmlns: "http://www.w3.org/2000/svg", + viewBox: "0 0 80 77.4" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", { + id: "Layer_1" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "m80,66.17v-16.1c0-2.3-2.5-3.8-4.5-2.6l-14,8.1c-.9.5-1.5,1.5-1.5,2.6v16.2c0,2.3,2.5,3.8,4.5,2.6l14-8.1c.9-.6,1.5-1.6,1.5-2.7Z" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "m55.7,13.78l-14.2,8.2c-.9.5-2.1.5-3,0l-14.2-8.2c-2-1.2-2-4,0-5.2L38.5.38c.9-.5,2.1-.5,3,0l14.2,8.2c2,1.1,2,4,0,5.2Z" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "m58.7,19.68l-.7.4c-2,1.2-2,4,0,5.2l7.1,4.1c.9.5,1.5,1.5,1.5,2.6v7.6c0,2.3,2.5,3.8,4.5,2.6l.7-.4c.9-.5,1.5-1.5,1.5-2.6v-11c0-1.1-.6-2.1-1.5-2.6l-10.1-5.8c-.9-.6-2.1-.6-3-.1Z" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "m0,66.17v-16.1c0-2.3,2.5-3.8,4.5-2.6l14,8.1c.9.5,1.5,1.5,1.5,2.6v16.2c0,2.3-2.5,3.8-4.5,2.6l-14-8.1c-.9-.6-1.5-1.6-1.5-2.7Z" + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { + d: "m21.3,19.68l.7.4c2,1.2,2,4,0,5.2l-7.1,4.1c-.9.5-1.5,1.5-1.5,2.6v7.6c0,2.3-2.5,3.8-4.5,2.6l-.7-.4c-.9-.5-1.5-1.5-1.5-2.6v-11.1c0-1.1.6-2.1,1.5-2.6l10.1-5.8c.9-.5,2.1-.5,3,0Z" + }))), + foreground: "#DF1E1E" + }, + edit: _edit__WEBPACK_IMPORTED_MODULE_5__["default"], + save: _save__WEBPACK_IMPORTED_MODULE_6__["default"] +}); + +/***/ }), + +/***/ "./src/points-cles/nested-children/edit.js": +/*!*************************************************!*\ + !*** ./src/points-cles/nested-children/edit.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Edit) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/points-cles/nested-children/editor.scss"); + + + + +function Edit({ + attributes, + setAttributes +}) { + const { + userName, + userPosition + } = attributes; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichText, { + className: "user-name", + onChange: value => setAttributes({ + userName: value + }), + value: userName, + placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("UserName Here", "text-box"), + tagName: "p", + allowedFormats: [] + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, userPosition)); +} + +/***/ }), + +/***/ "./src/points-cles/nested-children/index.js": +/*!**************************************************!*\ + !*** ./src/points-cles/nested-children/index.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/points-cles/nested-children/style.scss"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/points-cles/nested-children/block.json"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/points-cles/nested-children/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/points-cles/nested-children/save.js"); + + + + + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_2__.name, { + title: _block_json__WEBPACK_IMPORTED_MODULE_2__.title, + icon: "smiley", + category: "wpblock-blocks", + parent: ["wpblocks-multiple/nested-parent"], + supports: _block_json__WEBPACK_IMPORTED_MODULE_2__.supports, + attributes: _block_json__WEBPACK_IMPORTED_MODULE_2__.attributes, + edit: _edit__WEBPACK_IMPORTED_MODULE_3__["default"], + save: _save__WEBPACK_IMPORTED_MODULE_4__["default"] +}); + +/***/ }), + +/***/ "./src/points-cles/nested-children/save.js": +/*!*************************************************!*\ + !*** ./src/points-cles/nested-children/save.js ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ save) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); + + +function save({ + attributes +}) { + const { + userName, + userPosition + } = attributes; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.RichText.Content, { + tagName: "h2", + value: userName, + className: "mydummytext" + }); +} + +/***/ }), + +/***/ "./src/points-cles/save.js": +/*!*********************************!*\ + !*** ./src/points-cles/save.js ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ save) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utilities.js */ "./utilities.js"); + + + + // pour les querry + +function save({ + attributes, + setAttributes +}) { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { + className: "wp-block-homegrade-content-blocks-points-cles" + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Les points clés", "homegrade-theme__bloks-texte-fonctionnel")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null)); +} + +/***/ }), + +/***/ "./utilities.js": +/*!**********************!*\ + !*** ./utilities.js ***! + \**********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getThematiqueFamilySlug: () => (/* binding */ getThematiqueFamilySlug), +/* harmony export */ lol: () => (/* binding */ lol) +/* harmony export */ }); +function lol(params) { + console.log("lol" + params); +} +function getThematiqueFamilySlug(thematique_slug) { + switch (thematique_slug) { + case "energie": + case "urbanisme": + return "energies-urbanisme"; + case "acoustique": + case "petites-coproprietes": + return "acoustique-coproprietes"; + case "isolation": + case "au-quotidien": + return "isolation-quotidien"; + case "energies": + case "urbanisme": + return "energies-urbanisme"; + case "patrimoine": + case "renovation": + return "patrimoine-renovation"; + case "location": + return "location"; + } +} + +/***/ }), + +/***/ "./src/points-cles/editor.scss": +/*!*************************************!*\ + !*** ./src/points-cles/editor.scss ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/points-cles/nested-children/editor.scss": +/*!*****************************************************!*\ + !*** ./src/points-cles/nested-children/editor.scss ***! + \*****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/points-cles/nested-children/style.scss": +/*!****************************************************!*\ + !*** ./src/points-cles/nested-children/style.scss ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/points-cles/style.scss": +/*!************************************!*\ + !*** ./src/points-cles/style.scss ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/points-cles/img/icon_feather_key.png": +/*!**************************************************!*\ + !*** ./src/points-cles/img/icon_feather_key.png ***! + \**************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +module.exports = __webpack_require__.p + "images/icon_feather_key.26c1f367.png"; + +/***/ }), + +/***/ "@wordpress/block-editor": +/*!*************************************!*\ + !*** external ["wp","blockEditor"] ***! + \*************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blockEditor"]; + +/***/ }), + +/***/ "@wordpress/blocks": +/*!********************************!*\ + !*** external ["wp","blocks"] ***! + \********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blocks"]; + +/***/ }), + +/***/ "@wordpress/data": +/*!******************************!*\ + !*** external ["wp","data"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["data"]; + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["element"]; + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["i18n"]; + +/***/ }), + +/***/ "./src/points-cles/block.json": +/*!************************************!*\ + !*** ./src/points-cles/block.json ***! + \************************************/ +/***/ ((module) => { + +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/points-cles","version":"0.1.0","title":"Points clés","category":"homegrade-blocks","description":"Bloc de points-cles","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"currentGeneralThematiqueSlug":{"type":"string","default":""},"postTaxonomy":{"type":"string","default":"isolation"}}}'); + +/***/ }), + +/***/ "./src/points-cles/nested-children/block.json": +/*!****************************************************!*\ + !*** ./src/points-cles/nested-children/block.json ***! + \****************************************************/ +/***/ ((module) => { + +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}'); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/global */ +/******/ (() => { +/******/ __webpack_require__.g = (function() { +/******/ if (typeof globalThis === 'object') return globalThis; +/******/ try { +/******/ return this || new Function('return this')(); +/******/ } catch (e) { +/******/ if (typeof window === 'object') return window; +/******/ } +/******/ })(); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/publicPath */ +/******/ (() => { +/******/ var scriptUrl; +/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; +/******/ var document = __webpack_require__.g.document; +/******/ if (!scriptUrl && document) { +/******/ if (document.currentScript) +/******/ scriptUrl = document.currentScript.src; +/******/ if (!scriptUrl) { +/******/ var scripts = document.getElementsByTagName("script"); +/******/ if(scripts.length) { +/******/ var i = scripts.length - 1; +/******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src; +/******/ } +/******/ } +/******/ } +/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration +/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. +/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); +/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); +/******/ __webpack_require__.p = scriptUrl + "../"; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "points-cles/index": 0, +/******/ "points-cles/style-index": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = globalThis["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module depends on other loaded chunks and execution need to be delayed +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["points-cles/style-index"], () => (__webpack_require__("./src/points-cles/index.js"))) +/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ +/******/ })() +; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/points-cles/index.js.map b/build/points-cles/index.js.map new file mode 100644 index 0000000..62352e5 --- /dev/null +++ b/build/points-cles/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"points-cles/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAqC;AACiB;AAC/B;AACsB;AAC0B;AAExD,SAASK,IAAIA,CAAC;EAAEC,UAAU;EAAEC;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;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WClBA;;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://test-de-block/./src/points-cles/edit.js","webpack://test-de-block/./src/points-cles/index.js","webpack://test-de-block/./src/points-cles/nested-children/edit.js","webpack://test-de-block/./src/points-cles/nested-children/index.js","webpack://test-de-block/./src/points-cles/nested-children/save.js","webpack://test-de-block/./src/points-cles/save.js","webpack://test-de-block/./utilities.js","webpack://test-de-block/./src/points-cles/editor.scss?0510","webpack://test-de-block/./src/points-cles/nested-children/editor.scss?4a4b","webpack://test-de-block/./src/points-cles/nested-children/style.scss?487e","webpack://test-de-block/./src/points-cles/style.scss?29c1","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/global","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/publicPath","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nimport img from \"./img/icon_feather_key.png\";\nimport { ReactComponent as SvgIcon } from \"./img/icon_feather_key.png\";\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\t\n\t\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\t{__(\"Les points clés\", \"homegrade-theme__bloks-texte-fonctionnel\")}\n\t\t\t\t\t

\n\t\t\t\t
\n\n\t\t\t\t\n\t\t\t
\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport { __ } from \"@wordpress/i18n\";\nimport \"./style.scss\";\n\nimport \"./nested-children\";\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\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#DF1E1E\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t
\n\t\t\t setAttributes({ userName: value })}\n\t\t\t\tvalue={userName}\n\t\t\t\tplaceholder={__(\"UserName Here\", \"text-box\")}\n\t\t\t\ttagName=\"p\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\n\t\t\t

{userPosition}

\n\t\t
\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: \"smiley\",\n\tcategory: \"wpblock-blocks\",\n\tparent: [\"wpblocks-multiple/nested-parent\"],\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t\n\t);\n}\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\nimport { __ } from \"@wordpress/i18n\";\nimport { useSelect, useDispatch } from \"@wordpress/data\"; // pour les querry\nimport { getThematiqueFamilySlug } from \"../../utilities.js\";\n\nexport default function save({ attributes, setAttributes }) {\n\treturn (\n\t\t
\n\t\t\t

\n\t\t\t\t{__(\"Les points clés\", \"homegrade-theme__bloks-texte-fonctionnel\")}\n\t\t\t

\n\t\t\t\n\t\t
\n\t);\n}\n","export function lol(params) {\r\n\tconsole.log(\"lol\" + params);\r\n}\r\n\r\nexport function getThematiqueFamilySlug(thematique_slug) {\r\n\tswitch (thematique_slug) {\r\n\t\tcase \"energie\":\r\n\t\tcase \"urbanisme\":\r\n\t\t\treturn \"energies-urbanisme\";\r\n\r\n\t\tcase \"acoustique\":\r\n\t\tcase \"petites-coproprietes\":\r\n\t\t\treturn \"acoustique-coproprietes\";\r\n\r\n\t\tcase \"isolation\":\r\n\t\tcase \"au-quotidien\":\r\n\t\t\treturn \"isolation-quotidien\";\r\n\r\n\t\tcase \"energies\":\r\n\t\tcase \"urbanisme\":\r\n\t\t\treturn \"energies-urbanisme\";\r\n\r\n\t\tcase \"patrimoine\":\r\n\t\tcase \"renovation\":\r\n\t\t\treturn \"patrimoine-renovation\";\r\n\r\n\t\tcase \"location\":\r\n\t\t\treturn \"location\";\r\n\t}\r\n}\r\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\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};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl + \"../\";","// 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\"points-cles/index\": 0,\n\t\"points-cles/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"points-cles/style-index\"], () => (__webpack_require__(\"./src/points-cles/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","InnerBlocks","img","ReactComponent","SvgIcon","Edit","attributes","setAttributes","createElement","Fragment","className","src","allowedBlocks","template","registerBlockType","save","metadata","name","icon","id","xmlns","viewBox","d","foreground","edit","useBlockProps","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","userName","userPosition","onChange","value","placeholder","tagName","allowedFormats","Save","title","category","parent","supports","Content","useSelect","useDispatch","getThematiqueFamilySlug","lol","params","console","log","thematique_slug"],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/nested-children/block.json b/build/points-cles/nested-children/block.json similarity index 100% rename from build/nested-parent/nested-children/block.json rename to build/points-cles/nested-children/block.json diff --git a/build/points-cles/nested-children/index.asset.php b/build/points-cles/nested-children/index.asset.php new file mode 100644 index 0000000..c8b6680 --- /dev/null +++ b/build/points-cles/nested-children/index.asset.php @@ -0,0 +1 @@ + array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => 'bbbb6eac35093e2148e5'); diff --git a/build/nested-parent/nested-children/index.css b/build/points-cles/nested-children/index.css similarity index 90% rename from build/nested-parent/nested-children/index.css rename to build/points-cles/nested-children/index.css index deacbd6..5f7c3d0 100644 --- a/build/nested-parent/nested-children/index.css +++ b/build/points-cles/nested-children/index.css @@ -1,6 +1,6 @@ -/*!**********************************************************************************************************************************************************************************************************************************************************************!*\ - !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/nested-parent/nested-children/editor.scss ***! - \**********************************************************************************************************************************************************************************************************************************************************************/ +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/nested-children/editor.scss ***! + \********************************************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied inside the editor only. * diff --git a/build/points-cles/nested-children/index.css.map b/build/points-cles/nested-children/index.css.map new file mode 100644 index 0000000..fd06a26 --- /dev/null +++ b/build/points-cles/nested-children/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"points-cles/nested-children/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/points-cles/nested-children/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/nested-parent/nested-children/index.js b/build/points-cles/nested-children/index.js similarity index 87% rename from build/nested-parent/nested-children/index.js rename to build/points-cles/nested-children/index.js index a822d56..a463852 100644 --- a/build/nested-parent/nested-children/index.js +++ b/build/points-cles/nested-children/index.js @@ -2,10 +2,10 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ -/***/ "./src/nested-parent/nested-children/edit.js": -/*!***************************************************!*\ - !*** ./src/nested-parent/nested-children/edit.js ***! - \***************************************************/ +/***/ "./src/points-cles/nested-children/edit.js": +/*!*************************************************!*\ + !*** ./src/points-cles/nested-children/edit.js ***! + \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -18,7 +18,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/nested-parent/nested-children/editor.scss"); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./editor.scss */ "./src/points-cles/nested-children/editor.scss"); @@ -45,19 +45,19 @@ function Edit({ /***/ }), -/***/ "./src/nested-parent/nested-children/index.js": -/*!****************************************************!*\ - !*** ./src/nested-parent/nested-children/index.js ***! - \****************************************************/ +/***/ "./src/points-cles/nested-children/index.js": +/*!**************************************************!*\ + !*** ./src/points-cles/nested-children/index.js ***! + \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/nested-parent/nested-children/style.scss"); -/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/nested-parent/nested-children/block.json"); -/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/nested-parent/nested-children/edit.js"); -/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/nested-parent/nested-children/save.js"); +/* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/points-cles/nested-children/style.scss"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block.json */ "./src/points-cles/nested-children/block.json"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./edit */ "./src/points-cles/nested-children/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./save */ "./src/points-cles/nested-children/save.js"); @@ -76,10 +76,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/nested-children/save.js": -/*!***************************************************!*\ - !*** ./src/nested-parent/nested-children/save.js ***! - \***************************************************/ +/***/ "./src/points-cles/nested-children/save.js": +/*!*************************************************!*\ + !*** ./src/points-cles/nested-children/save.js ***! + \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -108,10 +108,10 @@ function save({ /***/ }), -/***/ "./src/nested-parent/nested-children/editor.scss": -/*!*******************************************************!*\ - !*** ./src/nested-parent/nested-children/editor.scss ***! - \*******************************************************/ +/***/ "./src/points-cles/nested-children/editor.scss": +/*!*****************************************************!*\ + !*** ./src/points-cles/nested-children/editor.scss ***! + \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -120,10 +120,10 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/***/ "./src/nested-parent/nested-children/style.scss": -/*!******************************************************!*\ - !*** ./src/nested-parent/nested-children/style.scss ***! - \******************************************************/ +/***/ "./src/points-cles/nested-children/style.scss": +/*!****************************************************!*\ + !*** ./src/points-cles/nested-children/style.scss ***! + \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { __webpack_require__.r(__webpack_exports__); @@ -172,10 +172,10 @@ module.exports = window["wp"]["i18n"]; /***/ }), -/***/ "./src/nested-parent/nested-children/block.json": -/*!******************************************************!*\ - !*** ./src/nested-parent/nested-children/block.json ***! - \******************************************************/ +/***/ "./src/points-cles/nested-children/block.json": +/*!****************************************************!*\ + !*** ./src/points-cles/nested-children/block.json ***! + \****************************************************/ /***/ ((module) => { module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"wpblocks-multiple/nested-children","version":"0.1.0","title":"Nested Childrenes","category":"wpblock-blocks","icon":{"background":"#0414eb","foreground":"#fff","src":"admin-plugins"},"description":"Children Nested. #ChildrenNested","supports":{"html":false,"reusable":false},"textdomain":"nested-parent","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"userName":{"type":"string"},"userPosition":{"type":"string"}}}'); @@ -292,8 +292,8 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded /******/ var installedChunks = { -/******/ "nested-parent/nested-children/index": 0, -/******/ "nested-parent/style-index": 0 +/******/ "points-cles/nested-children/index": 0, +/******/ "points-cles/style-index": 0 /******/ }; /******/ /******/ // no chunk on demand loading @@ -343,7 +343,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module depends on other loaded chunks and execution need to be delayed -/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["nested-parent/style-index"], () => (__webpack_require__("./src/nested-parent/nested-children/index.js"))) +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["points-cles/style-index"], () => (__webpack_require__("./src/points-cles/nested-children/index.js"))) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ /******/ })() diff --git a/build/points-cles/nested-children/index.js.map b/build/points-cles/nested-children/index.js.map new file mode 100644 index 0000000..7edc84c --- /dev/null +++ b/build/points-cles/nested-children/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"points-cles/nested-children/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAqC;AAUJ;AACV;AACR,SAASS,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAGH,UAAU;EAC7C,OACCI,iEAAA,YAAab,kEAAa,EACzBa,iEAAA,CAACX,6DAAQ;IACRY,SAAS,EAAC,WAAW;IACrBC,QAAQ,EAAGC,KAAK,IAAKN,aAAa,CAAC;MAAEC,QAAQ,EAAEK;IAAM,CAAC,CAAE;IACxDA,KAAK,EAAEL,QAAS;IAChBM,WAAW,EAAElB,mDAAE,CAAC,eAAe,EAAE,UAAU,CAAE;IAC7CmB,OAAO,EAAC,GAAG;IACXC,cAAc,EAAE;EAAG,CACnB,CAAC,EAEFN,iEAAA,YAAID,YAAgB,CACZ,CAAC;AAEZ;;;;;;;;;;;;;;;;;AC5BsD;AAChC;AACc;AAEV;AACA;AAE1BQ,oEAAiB,CAACC,6CAAa,EAAE;EAChCG,KAAK,EAAEH,8CAAc;EACrBI,IAAI,EAAE,QAAQ;EACdC,QAAQ,EAAE,gBAAgB;EAC1BC,MAAM,EAAE,CAAC,iCAAiC,CAAC;EAC3CC,QAAQ,EAAEP,iDAAiB;EAC3BZ,UAAU,EAAEY,mDAAmB;EAC/BQ,IAAI,EAAErB,6CAAI;EACVsB,IAAI,EAAER,6CAAIA;AACX,CAAC,CAAC;;;;;;;;;;;;;;;;;;;AChB6E;AAEhE,SAASQ,IAAIA,CAAC;EAAErB;AAAW,CAAC,EAAE;EAC5C,MAAM;IAAEE,QAAQ;IAAEC;EAAa,CAAC,GAAGH,UAAU;EAC7C,OACCI,iEAAA,CAACX,6DAAQ,CAAC6B,OAAO;IAACb,OAAO,EAAC,IAAI;IAACF,KAAK,EAAEL,QAAS;IAACG,SAAS,EAAC;EAAa,CAAE,CAAC;AAE5E;;;;;;;;;;;ACPA;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/points-cles/nested-children/edit.js","webpack://test-de-block/./src/points-cles/nested-children/index.js","webpack://test-de-block/./src/points-cles/nested-children/save.js","webpack://test-de-block/./src/points-cles/nested-children/editor.scss?4a4b","webpack://test-de-block/./src/points-cles/nested-children/style.scss?487e","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t
\n\t\t\t setAttributes({ userName: value })}\n\t\t\t\tvalue={userName}\n\t\t\t\tplaceholder={__(\"UserName Here\", \"text-box\")}\n\t\t\t\ttagName=\"p\"\n\t\t\t\tallowedFormats={[]}\n\t\t\t/>\n\n\t\t\t

{userPosition}

\n\t\t
\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport metadata from \"./block.json\";\n\nimport Edit from \"./edit\";\nimport Save from \"./save\";\n\nregisterBlockType(metadata.name, {\n\ttitle: metadata.title,\n\ticon: \"smiley\",\n\tcategory: \"wpblock-blocks\",\n\tparent: [\"wpblocks-multiple/nested-parent\"],\n\tsupports: metadata.supports,\n\tattributes: metadata.attributes,\n\tedit: Edit,\n\tsave: Save,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { userName, userPosition } = attributes;\n\treturn (\n\t\t\n\t);\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"points-cles/nested-children/index\": 0,\n\t\"points-cles/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"points-cles/style-index\"], () => (__webpack_require__(\"./src/points-cles/nested-children/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","Edit","attributes","setAttributes","userName","userPosition","createElement","className","onChange","value","placeholder","tagName","allowedFormats","registerBlockType","metadata","Save","name","title","icon","category","parent","supports","edit","save","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/points-cles/render.php b/build/points-cles/render.php new file mode 100644 index 0000000..bdd71a3 --- /dev/null +++ b/build/points-cles/render.php @@ -0,0 +1,22 @@ +'; +// print_r($block); +// echo ''; + +$inner_blocks_html = ''; +foreach ($block->inner_blocks as $inner_block) { + $inner_blocks_html .= $inner_block->render(); +} +?> +
+
+
+ +
+

+
+ + + +
\ No newline at end of file diff --git a/build/points-cles/style-index.css b/build/points-cles/style-index.css new file mode 100644 index 0000000..4220d55 --- /dev/null +++ b/build/points-cles/style-index.css @@ -0,0 +1,59 @@ +/*!***************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/style.scss ***! + \***************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ +.wp-block-homegrade-content-blocks-points-cles { + margin-bottom: 2rem; +} +.wp-block-homegrade-content-blocks-points-cles__titling { + display: flex; + align-items: center; +} +.wp-block-homegrade-content-blocks-points-cles__titling .icon { + background-color: black; + border-radius: 50%; + aspect-ratio: 1/1; + width: 40px; + padding: 10px; + height: -moz-fit-content; + height: fit-content; +} +.wp-block-homegrade-content-blocks-points-cles__titling .icon img { + width: 30px; + height: auto; +} +.wp-block-homegrade-content-blocks-points-cles__titling h3 { + padding-left: 10px; +} +.wp-block-homegrade-content-blocks-points-cles ul li { + list-style-type: disc; + list-style-position: inside; + margin-left: 1.5em; +} +.wp-block-homegrade-content-blocks-points-cles p + ul { + padding-top: 16px; +} +.wp-block-homegrade-content-blocks-points-cles ul + p { + padding-top: 16px; +} +/*!*******************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/points-cles/nested-children/style.scss ***! + \*******************************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ +.wp-block-create-block-blocka { + background-color: #21759b; + color: #fff; + padding: 2px; +} + +/*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file diff --git a/build/points-cles/style-index.css.map b/build/points-cles/style-index.css.map new file mode 100644 index 0000000..12bf850 --- /dev/null +++ b/build/points-cles/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"points-cles/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;AAAD;AACC;EACC;EACA;AACF;AAAE;EACC;EACA;EACA;EACA;EACA;EACA;EAAA;AAEH;AAAG;EACC;EACA;AAEJ;AACE;EACC;AACH;AAGC;EACC;EACA;EAEA;AAFF;AAKC;EACC;AAHF;AAKC;EACC;AAHF,C;;;;ACtCA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/points-cles/style.scss","webpack://test-de-block/./src/points-cles/nested-children/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-homegrade-content-blocks-points-cles {\n\tmargin-bottom: 2rem;\n\t&__titling {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t.icon {\n\t\t\tbackground-color: black;\n\t\t\tborder-radius: 50%;\n\t\t\taspect-ratio: 1/1;\n\t\t\twidth: 40px;\n\t\t\tpadding: 10px;\n\t\t\theight: fit-content;\n\n\t\t\timg {\n\t\t\t\twidth: 30px;\n\t\t\t\theight: auto;\n\t\t\t}\n\t\t}\n\t\th3 {\n\t\t\tpadding-left: 10px;\n\t\t}\n\t}\n\n\tul li {\n\t\tlist-style-type: disc;\n\t\tlist-style-position: inside;\n\t\t// display: flex;\n\t\tmargin-left: 1.5em;\n\t}\n\n\tp + ul {\n\t\tpadding-top: 16px;\n\t}\n\tul + p {\n\t\tpadding-top: 16px;\n\t}\n}\n","/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-blocka {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/questions-container-auto/block.json b/build/questions-container-auto/block.json new file mode 100644 index 0000000..a9567ed --- /dev/null +++ b/build/questions-container-auto/block.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "homegrade-content-blocks/questions-container-auto", + "version": "0.1.0", + "title": "Bloc Questions Auto", + "category": "homegrade-blocks", + "icon": { + "background": "#fff", + "foreground": "#DF1E1E", + "src": "feedback" + }, + "description": "Pour intégrer le contenu d'une fiche de questions dans une page conseils", + "supports": { + "html": false + }, + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "render": "file:./render.php", + "attributes": { + "relatedPostId": { + "type": "number" + }, + "montexte": { + "type": "string", + "default": "truc" + } + } +} \ No newline at end of file diff --git a/build/questions-container-auto/index.asset.php b/build/questions-container-auto/index.asset.php new file mode 100644 index 0000000..3411fb9 --- /dev/null +++ b/build/questions-container-auto/index.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b018718de6d4a0e7b9ad'); diff --git a/build/questions-container-auto/index.css b/build/questions-container-auto/index.css new file mode 100644 index 0000000..01c51ab --- /dev/null +++ b/build/questions-container-auto/index.css @@ -0,0 +1,13 @@ +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/questions-container-auto/editor.scss ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ +.wp-block-create-block-wpblock-latest-posts { + border: 1px dotted #f00; +} + +/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/build/questions-container-auto/index.css.map b/build/questions-container-auto/index.css.map new file mode 100644 index 0000000..4cdbdf9 --- /dev/null +++ b/build/questions-container-auto/index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"questions-container-auto/index.css","mappings":";;;AAAA;;;;EAAA;AAMA;EACC;AAAD,C","sources":["webpack://test-de-block/./src/questions-container-auto/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tborder: 1px dotted #f00;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/questions-container-auto/index.js b/build/questions-container-auto/index.js new file mode 100644 index 0000000..9168ea4 --- /dev/null +++ b/build/questions-container-auto/index.js @@ -0,0 +1,402 @@ +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ "./src/questions-container-auto/edit.js": +/*!**********************************************!*\ + !*** ./src/questions-container-auto/edit.js ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ Edit) +/* harmony export */ }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* 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 _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); +/* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./editor.scss */ "./src/questions-container-auto/editor.scss"); +/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); +/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); + + + + + // pour les querry + + + + +function Edit({ + attributes, + setAttributes +}) { + const { + relatedPostId, + montexte + } = attributes; + // console.log(montexte); + + function handleRelatedPostChange(postId) { + setAttributes({ + relatedPostId: Number(postId), + montexte: "test" + }); + } + let [taxonomiesOptions, setTaxonomiesOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); + let postTaxonomies = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core/editor").getCurrentPostAttribute("thematiques")); + let postMainTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core").getEntityRecord("taxonomy", "thematiques", postTaxonomies[0]), [postTaxonomies]); + let postParentTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + if (postMainTaxonomy) { + return select("core").getEntityRecord("taxonomy", "thematiques", postMainTaxonomy.parent); + } + }, [postMainTaxonomy]); + let relatedPostsOptions = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + if (postMainTaxonomy) { + return select("core").getEntityRecords("postType", "fiche-questions", { + per_page: -1, + _embed: true, + thematiques: postMainTaxonomy.id + }); + } + }, [postMainTaxonomy]); + let currentRelatedPost = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + return select("core").getEntityRecord("postType", "fiche-questions", relatedPostId); + }); + const { + relatedPosts + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + const { + getEntityRecords + } = select("core"); + let query = {}; + if (postMainTaxonomy) { + // Query args + query = { + status: "publish", + per_page: -1, + thematiques: postMainTaxonomy ? postMainTaxonomy.id : null + }; + } + return { + relatedPosts: getEntityRecords("postType", "fiche-questions", query) + }; + }); + // if (relatedPosts) { + // let test = relatedPosts.map(({ item }) =>

{item.title.rendered}

); + // } + let relatedPostsContent; + if (relatedPosts) { + relatedPostsContent = relatedPosts.map(post => { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h2", null, post.title.rendered), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.RawHTML, null, post.content.raw)); + }); + } + if (!relatedPostsOptions) { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "chargement\u2026")); + } + console.log(relatedPostId); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, relatedPosts && relatedPosts.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, relatedPostsContent), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, !relatedPostId && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.", "homegrade-theme__blocks-texte-fonctionnel"))), currentRelatedPost && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, currentRelatedPost.title.rendered), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.RawHTML, null, currentRelatedPost.content.raw)))); +} + +/***/ }), + +/***/ "./src/questions-container-auto/index.js": +/*!***********************************************!*\ + !*** ./src/questions-container-auto/index.js ***! + \***********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__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 _style_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./style.scss */ "./src/questions-container-auto/style.scss"); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/questions-container-auto/edit.js"); +/* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./src/questions-container-auto/block.json"); + + + + +(0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__.name, { + edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"] +}); + +/***/ }), + +/***/ "./src/questions-container-auto/editor.scss": +/*!**************************************************!*\ + !*** ./src/questions-container-auto/editor.scss ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "./src/questions-container-auto/style.scss": +/*!*************************************************!*\ + !*** ./src/questions-container-auto/style.scss ***! + \*************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + +/***/ }), + +/***/ "@wordpress/api-fetch": +/*!**********************************!*\ + !*** external ["wp","apiFetch"] ***! + \**********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["apiFetch"]; + +/***/ }), + +/***/ "@wordpress/block-editor": +/*!*************************************!*\ + !*** external ["wp","blockEditor"] ***! + \*************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blockEditor"]; + +/***/ }), + +/***/ "@wordpress/blocks": +/*!********************************!*\ + !*** external ["wp","blocks"] ***! + \********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["blocks"]; + +/***/ }), + +/***/ "@wordpress/components": +/*!************************************!*\ + !*** external ["wp","components"] ***! + \************************************/ +/***/ ((module) => { + +module.exports = window["wp"]["components"]; + +/***/ }), + +/***/ "@wordpress/data": +/*!******************************!*\ + !*** external ["wp","data"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["data"]; + +/***/ }), + +/***/ "@wordpress/element": +/*!*********************************!*\ + !*** external ["wp","element"] ***! + \*********************************/ +/***/ ((module) => { + +module.exports = window["wp"]["element"]; + +/***/ }), + +/***/ "@wordpress/i18n": +/*!******************************!*\ + !*** external ["wp","i18n"] ***! + \******************************/ +/***/ ((module) => { + +module.exports = window["wp"]["i18n"]; + +/***/ }), + +/***/ "./src/questions-container-auto/block.json": +/*!*************************************************!*\ + !*** ./src/questions-container-auto/block.json ***! + \*************************************************/ +/***/ ((module) => { + +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/questions-container-auto","version":"0.1.0","title":"Bloc Questions Auto","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Pour intégrer le contenu d\'une fiche de questions dans une page conseils","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"relatedPostId":{"type":"number"},"montexte":{"type":"string","default":"truc"}}}'); + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = __webpack_modules__; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/chunk loaded */ +/******/ (() => { +/******/ var deferred = []; +/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ if(chunkIds) { +/******/ priority = priority || 0; +/******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; +/******/ deferred[i] = [chunkIds, fn, priority]; +/******/ return; +/******/ } +/******/ var notFulfilled = Infinity; +/******/ for (var i = 0; i < deferred.length; i++) { +/******/ var [chunkIds, fn, priority] = deferred[i]; +/******/ var fulfilled = true; +/******/ for (var j = 0; j < chunkIds.length; j++) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { +/******/ chunkIds.splice(j--, 1); +/******/ } else { +/******/ fulfilled = false; +/******/ if(priority < notFulfilled) notFulfilled = priority; +/******/ } +/******/ } +/******/ if(fulfilled) { +/******/ deferred.splice(i--, 1) +/******/ var r = fn(); +/******/ if (r !== undefined) result = r; +/******/ } +/******/ } +/******/ return result; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/jsonp chunk loading */ +/******/ (() => { +/******/ // no baseURI +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ "questions-container-auto/index": 0, +/******/ "questions-container-auto/style-index": 0 +/******/ }; +/******/ +/******/ // no chunk on demand loading +/******/ +/******/ // no prefetching +/******/ +/******/ // no preloaded +/******/ +/******/ // no HMR +/******/ +/******/ // no HMR manifest +/******/ +/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ +/******/ // install a JSONP callback for chunk loading +/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var [chunkIds, moreModules, runtime] = data; +/******/ // add "moreModules" to the modules object, +/******/ // then flag all "chunkIds" as loaded and fire callback +/******/ var moduleId, chunkId, i = 0; +/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) { +/******/ for(moduleId in moreModules) { +/******/ if(__webpack_require__.o(moreModules, moduleId)) { +/******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if(runtime) var result = runtime(__webpack_require__); +/******/ } +/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data); +/******/ for(;i < chunkIds.length; i++) { +/******/ chunkId = chunkIds[i]; +/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) { +/******/ installedChunks[chunkId][0](); +/******/ } +/******/ installedChunks[chunkId] = 0; +/******/ } +/******/ return __webpack_require__.O(result); +/******/ } +/******/ +/******/ var chunkLoadingGlobal = globalThis["webpackChunktest_de_block"] = globalThis["webpackChunktest_de_block"] || []; +/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0)); +/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal)); +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module depends on other loaded chunks and execution need to be delayed +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["questions-container-auto/style-index"], () => (__webpack_require__("./src/questions-container-auto/index.js"))) +/******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); +/******/ +/******/ })() +; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/questions-container-auto/index.js.map b/build/questions-container-auto/index.js.map new file mode 100644 index 0000000..04417e8 --- /dev/null +++ b/build/questions-container-auto/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"questions-container-auto/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAMJ;AAWF;AACa,CAAC;AACtB;AACqB;AACsB;AACb;AAEtC,SAASoB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAGH,UAAU;EAC9C;;EAEA,SAASI,uBAAuBA,CAACC,MAAM,EAAE;IACxCJ,aAAa,CAAC;MAAEC,aAAa,EAAEI,MAAM,CAACD,MAAM,CAAC;MAAEF,QAAQ,EAAE;IAAO,CAAC,CAAC;EACnE;EAEA,IAAI,CAACI,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGZ,4DAAQ,CAAC,IAAI,CAAC;EAC9D,IAAIa,cAAc,GAAGhB,0DAAS,CAAEiB,MAAM,IACrCA,MAAM,CAAC,aAAa,CAAC,CAACC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CAAC,CAAC;;;;;;;;;;;ACTF;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/questions-container-auto/edit.js","webpack://test-de-block/./src/questions-container-auto/index.js","webpack://test-de-block/./src/questions-container-auto/editor.scss?2342","webpack://test-de-block/./src/questions-container-auto/style.scss?0791","webpack://test-de-block/external window [\"wp\",\"apiFetch\"]","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\nimport \"./editor.scss\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { useEffect, useState, RawHTML } from \"@wordpress/element\";\nimport { Autocomplete } from \"@wordpress/components\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { relatedPostId, montexte } = attributes;\n\t// console.log(montexte);\n\n\tfunction handleRelatedPostChange(postId) {\n\t\tsetAttributes({ relatedPostId: Number(postId), montexte: \"test\" });\n\t}\n\n\tlet [taxonomiesOptions, setTaxonomiesOptions] = useState(null);\n\tlet postTaxonomies = useSelect((select) =>\n\t\tselect(\"core/editor\").getCurrentPostAttribute(\"thematiques\")\n\t);\n\tlet postMainTaxonomy = useSelect(\n\t\t(select) =>\n\t\t\tselect(\"core\").getEntityRecord(\n\t\t\t\t\"taxonomy\",\n\t\t\t\t\"thematiques\",\n\t\t\t\tpostTaxonomies[0]\n\t\t\t),\n\t\t[postTaxonomies]\n\t);\n\tlet postParentTaxonomy = useSelect(\n\t\t(select) => {\n\t\t\tif (postMainTaxonomy) {\n\t\t\t\treturn select(\"core\").getEntityRecord(\n\t\t\t\t\t\"taxonomy\",\n\t\t\t\t\t\"thematiques\",\n\t\t\t\t\tpostMainTaxonomy.parent\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[postMainTaxonomy]\n\t);\n\n\tlet relatedPostsOptions = useSelect(\n\t\t(select) => {\n\t\t\tif (postMainTaxonomy) {\n\t\t\t\treturn select(\"core\").getEntityRecords(\"postType\", \"fiche-questions\", {\n\t\t\t\t\tper_page: -1,\n\t\t\t\t\t_embed: true,\n\t\t\t\t\tthematiques: postMainTaxonomy.id,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[postMainTaxonomy]\n\t);\n\n\tlet currentRelatedPost = useSelect((select) => {\n\t\treturn select(\"core\").getEntityRecord(\n\t\t\t\"postType\",\n\t\t\t\"fiche-questions\",\n\t\t\trelatedPostId\n\t\t);\n\t});\n\n\tconst { relatedPosts } = useSelect((select) => {\n\t\tconst { getEntityRecords } = select(\"core\");\n\t\tlet query = {};\n\t\tif (postMainTaxonomy) {\n\t\t\t// Query args\n\t\t\tquery = {\n\t\t\t\tstatus: \"publish\",\n\t\t\t\tper_page: -1,\n\t\t\t\tthematiques: postMainTaxonomy ? postMainTaxonomy.id : null,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\trelatedPosts: getEntityRecords(\"postType\", \"fiche-questions\", query),\n\t\t};\n\t});\n\t// if (relatedPosts) {\n\t// \tlet test = relatedPosts.map(({ item }) =>

{item.title.rendered}

);\n\t// }\n\tlet relatedPostsContent;\n\tif (relatedPosts) {\n\t\trelatedPostsContent = relatedPosts.map((post) => {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t

{post.title.rendered}

\n\t\t\t\t\t{post.content.raw}\n\t\t\t\t\n\t\t\t);\n\t\t});\n\t}\n\n\tif (!relatedPostsOptions) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t

chargement…

\n\t\t\t\n\t\t);\n\t}\n\n\tconsole.log(relatedPostId);\n\n\treturn (\n\t\t<>\n\t\t\t{relatedPosts && relatedPosts.length > 0 && (\n\t\t\t\t
{relatedPostsContent}
\n\t\t\t)}\n\n\t\t\t
\n\t\t\t\t{!relatedPostId && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t

\n\t\t\t\t\t\t\t{__(\n\t\t\t\t\t\t\t\t\"Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.\",\n\t\t\t\t\t\t\t\t\"homegrade-theme__blocks-texte-fonctionnel\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t

\n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t{currentRelatedPost && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t

{currentRelatedPost.title.rendered}

\n\t\t\t\t\t\t{currentRelatedPost.content.raw}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{/* {relatedPostsOptions &&\n\t\t\t\t\trelatedPostsOptions.map((post) => {\n\t\t\t\t\t\treturn
  • {post.title.rendered}
  • ;\n\t\t\t\t\t})} */}\n\t\t\t
    \n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"questions-container-auto/index\": 0,\n\t\"questions-container-auto/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"questions-container-auto/style-index\"], () => (__webpack_require__(\"./src/questions-container-auto/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","apiFetch","useEffect","useState","RawHTML","Autocomplete","Edit","attributes","setAttributes","relatedPostId","montexte","handleRelatedPostChange","postId","Number","taxonomiesOptions","setTaxonomiesOptions","postTaxonomies","select","getCurrentPostAttribute","postMainTaxonomy","getEntityRecord","postParentTaxonomy","parent","relatedPostsOptions","getEntityRecords","per_page","_embed","thematiques","id","currentRelatedPost","relatedPosts","query","status","relatedPostsContent","map","post","createElement","Fragment","title","rendered","content","raw","console","log","length","registerBlockType","metadata","name","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/build/questions-container-auto/render.php b/build/questions-container-auto/render.php new file mode 100644 index 0000000..02f14d3 --- /dev/null +++ b/build/questions-container-auto/render.php @@ -0,0 +1,27 @@ + 30, + 'post_status' => 'publish', + 'post_type' => 'fiche-questions', + 'thematiques' => $term->ID, +)); +?> + + +
    + + +
    +

    post_title ?>

    +
    post_content ?>
    +
    + + + +
    \ No newline at end of file diff --git a/build/questions-container-auto/style-index.css b/build/questions-container-auto/style-index.css new file mode 100644 index 0000000..a9c9013 --- /dev/null +++ b/build/questions-container-auto/style-index.css @@ -0,0 +1,17 @@ +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/questions-container-auto/style.scss ***! + \****************************************************************************************************************************************************************************************************************************************************************/ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ +.questions-container-block__question-content { + padding: 10px 0 30px 0; +} +.questions-container-block h2 { + font-weight: 800; +} + +/*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file diff --git a/build/questions-container-auto/style-index.css.map b/build/questions-container-auto/style-index.css.map new file mode 100644 index 0000000..00fed48 --- /dev/null +++ b/build/questions-container-auto/style-index.css.map @@ -0,0 +1 @@ +{"version":3,"file":"questions-container-auto/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAQC;EACC;AADF;AAIC;EACC;AAFF,C","sources":["webpack://test-de-block/./src/questions-container-auto/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.questions-container-block {\n\t&__question-content {\n\t\tpadding: 10px 0 30px 0;\n\t}\n\n\th2 {\n\t\tfont-weight: 800;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/questions-container/block.json b/build/questions-container/block.json index e86d0cf..443e6cf 100644 --- a/build/questions-container/block.json +++ b/build/questions-container/block.json @@ -4,7 +4,7 @@ "name": "homegrade-content-blocks/questions-container", "version": "0.1.0", "title": "Bloc Questions", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": { "background": "#fff", "foreground": "#DF1E1E", @@ -14,9 +14,18 @@ "supports": { "html": false }, - "textdomain": "wpblock-latest-posts", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", - "render": "file:./render.php" + "render": "file:./render.php", + "attributes": { + "relatedPostId": { + "type": "number" + }, + "montexte": { + "type": "string", + "default": "truc" + } + } } \ No newline at end of file diff --git a/build/questions-container/index.asset.php b/build/questions-container/index.asset.php index a7285b5..3d8f531 100644 --- a/build/questions-container/index.asset.php +++ b/build/questions-container/index.asset.php @@ -1 +1 @@ - array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'a41ee85521c17cd88285'); + array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'ae1738942c42186da566'); diff --git a/build/questions-container/index.js b/build/questions-container/index.js index ecb13d8..6b37d65 100644 --- a/build/questions-container/index.js +++ b/build/questions-container/index.js @@ -38,73 +38,101 @@ function Edit({ attributes, setAttributes }) { - const autocompleters = [{ - name: "fruit", - // The prefix that triggers this completer - triggerPrefix: "~", - // The option data - options: [{ - visual: "🍎", - name: "Apple", - id: 1 - }, { - visual: "🍊", - name: "Orange", - id: 2 - }, { - visual: "🍇", - name: "Grapes", - id: 3 - }], - // Returns a label for an option like "🍊 Orange" - getOptionLabel: option => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { - className: "icon" - }, option.visual), option.name), - // Declares that options should be matched by their name - getOptionKeywords: option => [option.name], - // Declares that the Grapes option is disabled - isOptionDisabled: option => option.name === "Grapes", - // Declares completions should be inserted as abbreviations - getOptionCompletion: option => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("abbr", { - title: option.name - }, option.visual) - }]; - let [taxonomiesOptions, setTaxonomiesOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); - let relatedPosts = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core").getEntityRecords("postType", "fiche-questions", { - per_page: -1, - thematiques: 35 - })); + var _ref; + const { + relatedPostId, + montexte + } = attributes; + // console.log(montexte); - // function getDatas() { - // // Liste des questions sur la thématique courante - - // apiFetch({ path: "/wp/v2/thematiques?per_page=-1" }).then((terms) => { - // let notEmptyTaxs = terms.filter((term) => term.count > 0); - - // setTaxonomiesOptions(notEmptyTaxs); - // }); - // } - - (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - // getDatas(); - }, []); - if (relatedPosts) { - console.log(relatedPosts); + function handleRelatedPostChange(postId) { + setAttributes({ + relatedPostId: Number(postId), + montexte: "test" + }); + // console.log(typeof relatedPostId); + // console.log(relatedPostId); + // console.log(montexte); } - return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Autocomplete, { - completers: autocompleters - }, ({ - isExpanded, - listBoxId, - activeId - }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { - contentEditable: true, - suppressContentEditableWarning: true, - "aria-autocomplete": "list", - "aria-expanded": isExpanded, - "aria-owns": listBoxId, - "aria-activedescendant": activeId - })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Type ~ for triggering the autocomplete."), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "test")); + + let [taxonomiesOptions, setTaxonomiesOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); + let postTaxonomies = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core/editor").getCurrentPostAttribute("thematiques")); + let postMainTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select("core").getEntityRecord("taxonomy", "thematiques", postTaxonomies[0]), [postTaxonomies]); + let postParentTaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + if (postMainTaxonomy) { + return select("core").getEntityRecord("taxonomy", "thematiques", postMainTaxonomy.parent); + } + }, [postMainTaxonomy]); + let currentGeneralThematique = (_ref = postParentTaxonomy !== null && postParentTaxonomy !== void 0 ? postParentTaxonomy : postMainTaxonomy) !== null && _ref !== void 0 ? _ref : null; + let relatedPostsOptions = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + if (postMainTaxonomy) { + return select("core").getEntityRecords("postType", "fiche-questions", { + per_page: -1, + _embed: true, + thematiques: postMainTaxonomy.id + }); + } + }, [postMainTaxonomy]); + let currentRelatedPost = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + return select("core").getEntityRecord("postType", "fiche-questions", relatedPostId); + }); + const { + pages + } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { + const { + getEntityRecords + } = select("core"); + let query = {}; + if (postMainTaxonomy) { + // Query args + query = { + status: "publish", + per_page: -1, + thematiques: postMainTaxonomy ? postMainTaxonomy.id : null + }; + } + return { + pages: getEntityRecords("postType", "fiche-questions", query) + }; + }); + + // populate options for + let options = []; + if (pages) { + options.push({ + value: 0, + label: "Select a page" + }); + pages.forEach(page => { + options.push({ + value: page.id, + label: page.title.rendered + }); + }); + } else { + options.push({ + value: 0, + label: "Loading..." + }); + } + if (postMainTaxonomy) { + // console.log(postMainTaxonomy.id); + } + if (relatedPostsOptions) { + // console.log(relatedPostsOptions); + } + if (!relatedPostsOptions) { + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "chargement\u2026")); + } + console.log(relatedPostId); + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { + title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Question Relié", "homegrade-theme__bloks-texte-fonctionnel") + }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, { + label: (postParentTaxonomy ? postParentTaxonomy.name + " | " : "") + postMainTaxonomy.name, + value: relatedPostId, + options: options, + onChange: e => handleRelatedPostChange(e) + }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps, !relatedPostId && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.", "homegrade-theme__blocks-texte-fonctionnel"))), currentRelatedPost && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h3", null, currentRelatedPost.title.rendered), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.RawHTML, null, currentRelatedPost.content.raw)))); } /***/ }), @@ -231,7 +259,7 @@ module.exports = window["wp"]["i18n"]; \********************************************/ /***/ ((module) => { -module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/questions-container","version":"0.1.0","title":"Bloc Questions","category":"wpblock-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Pour intégrer le contenu d\'une fiche de questions dans une page conseils","supports":{"html":false},"textdomain":"wpblock-latest-posts","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php"}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/questions-container","version":"0.1.0","title":"Bloc Questions","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#DF1E1E","src":"feedback"},"description":"Pour intégrer le contenu d\'une fiche de questions dans une page conseils","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php","attributes":{"relatedPostId":{"type":"number"},"montexte":{"type":"string","default":"truc"}}}'); /***/ }) diff --git a/build/questions-container/index.js.map b/build/questions-container/index.js.map index ec50c29..163724b 100644 --- a/build/questions-container/index.js.map +++ b/build/questions-container/index.js.map @@ -1 +1 @@ -{"version":3,"file":"questions-container/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAMJ;AAWF;AACa,CAAC;AACtB;AACqB;AACa;AACJ;AAEtC,SAASmB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAMC,cAAc,GAAG,CACtB;IACCC,IAAI,EAAE,OAAO;IACb;IACAC,aAAa,EAAE,GAAG;IAClB;IACAC,OAAO,EAAE,CACR;MAAEC,MAAM,EAAE,IAAI;MAAEH,IAAI,EAAE,OAAO;MAAEI,EAAE,EAAE;IAAE,CAAC,EACtC;MAAED,MAAM,EAAE,IAAI;MAAEH,IAAI,EAAE,QAAQ;MAAEI,EAAE,EAAE;IAAE,CAAC,EACvC;MAAED,MAAM,EAAE,IAAI;MAAEH,IAAI,EAAE,QAAQ;MAAEI,EAAE,EAAE;IAAE,CAAC,CACv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YAAG,MAAO,CACT,CAAC;AAEL;;;;;;;;;;;;;;;;ACnGsD;AAEhC;AAEI;AACU;AAEpCsB,oEAAiB,CAACC,6CAAa,EAAE;EAChCC,IAAI,EAAEnC,6CAAIA;AACX,CAAC,CAAC;;;;;;;;;;;ACTF;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/questions-container/edit.js","webpack://test-de-block/./src/questions-container/index.js","webpack://test-de-block/./src/questions-container/editor.scss?c845","webpack://test-de-block/./src/questions-container/style.scss?8f81","webpack://test-de-block/external window [\"wp\",\"apiFetch\"]","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\nimport \"./editor.scss\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { useEffect, useState } from \"@wordpress/element\";\nimport { Autocomplete } from \"@wordpress/components\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst autocompleters = [\n\t\t{\n\t\t\tname: \"fruit\",\n\t\t\t// The prefix that triggers this completer\n\t\t\ttriggerPrefix: \"~\",\n\t\t\t// The option data\n\t\t\toptions: [\n\t\t\t\t{ visual: \"🍎\", name: \"Apple\", id: 1 },\n\t\t\t\t{ visual: \"🍊\", name: \"Orange\", id: 2 },\n\t\t\t\t{ visual: \"🍇\", name: \"Grapes\", id: 3 },\n\t\t\t],\n\t\t\t// Returns a label for an option like \"🍊 Orange\"\n\t\t\tgetOptionLabel: (option) => (\n\t\t\t\t\n\t\t\t\t\t{option.visual}\n\t\t\t\t\t{option.name}\n\t\t\t\t\n\t\t\t),\n\t\t\t// Declares that options should be matched by their name\n\t\t\tgetOptionKeywords: (option) => [option.name],\n\t\t\t// Declares that the Grapes option is disabled\n\t\t\tisOptionDisabled: (option) => option.name === \"Grapes\",\n\t\t\t// Declares completions should be inserted as abbreviations\n\t\t\tgetOptionCompletion: (option) => (\n\t\t\t\t{option.visual}\n\t\t\t),\n\t\t},\n\t];\n\n\tlet [taxonomiesOptions, setTaxonomiesOptions] = useState(null);\n\n\tlet relatedPosts = useSelect((select) =>\n\t\tselect(\"core\").getEntityRecords(\"postType\", \"fiche-questions\", {\n\t\t\tper_page: -1,\n\t\t\tthematiques: 35,\n\t\t})\n\t);\n\n\t// function getDatas() {\n\t// \t// Liste des questions sur la thématique courante\n\n\t// \tapiFetch({ path: \"/wp/v2/thematiques?per_page=-1\" }).then((terms) => {\n\t// \t\tlet notEmptyTaxs = terms.filter((term) => term.count > 0);\n\n\t// \t\tsetTaxonomiesOptions(notEmptyTaxs);\n\t// \t});\n\t// }\n\n\tuseEffect(() => {\n\t\t// getDatas();\n\t}, []);\n\n\tif (relatedPosts) {\n\t\tconsole.log(relatedPosts);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t{({ isExpanded, listBoxId, activeId }) => (\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\n\t\t\t

    Type ~ for triggering the autocomplete.

    \n\t\t\t

    test

    \n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"questions-container/index\": 0,\n\t\"questions-container/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"questions-container/style-index\"], () => (__webpack_require__(\"./src/questions-container/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","apiFetch","useEffect","useState","Autocomplete","Edit","attributes","setAttributes","autocompleters","name","triggerPrefix","options","visual","id","getOptionLabel","option","createElement","className","getOptionKeywords","isOptionDisabled","getOptionCompletion","title","taxonomiesOptions","setTaxonomiesOptions","relatedPosts","select","getEntityRecords","per_page","thematiques","console","log","Fragment","completers","isExpanded","listBoxId","activeId","contentEditable","suppressContentEditableWarning","registerBlockType","metadata","edit"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"questions-container/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAMJ;AAWF;AACa,CAAC;AACtB;AACqB;AACsB;AACb;AAEtC,SAASoB,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAAA,IAAAC,IAAA;EAC3D,MAAM;IAAEC,aAAa;IAAEC;EAAS,CAAC,GAAGJ,UAAU;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;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/questions-container/edit.js","webpack://test-de-block/./src/questions-container/index.js","webpack://test-de-block/./src/questions-container/editor.scss?c845","webpack://test-de-block/./src/questions-container/style.scss?8f81","webpack://test-de-block/external window [\"wp\",\"apiFetch\"]","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"data\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport {\n\tuseBlockProps,\n\tRichText,\n\tBlockControls,\n\tInspectorControls,\n} from \"@wordpress/block-editor\";\nimport {\n\tToolbarGroup,\n\tToolbarButton,\n\tDropdownMenu,\n\tToolbarDropdownMenu,\n\tPanelBody,\n\tTextControl,\n\tTextareaControl,\n\tToggleControl,\n\tSelectControl,\n} from \"@wordpress/components\";\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\nimport \"./editor.scss\";\nimport apiFetch from \"@wordpress/api-fetch\";\nimport { useEffect, useState, RawHTML } from \"@wordpress/element\";\nimport { Autocomplete } from \"@wordpress/components\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst { relatedPostId, montexte } = attributes;\n\t// console.log(montexte);\n\n\tfunction handleRelatedPostChange(postId) {\n\t\tsetAttributes({ relatedPostId: Number(postId), montexte: \"test\" });\n\t\t// console.log(typeof relatedPostId);\n\t\t// console.log(relatedPostId);\n\t\t// console.log(montexte);\n\t}\n\n\tlet [taxonomiesOptions, setTaxonomiesOptions] = useState(null);\n\tlet postTaxonomies = useSelect((select) =>\n\t\tselect(\"core/editor\").getCurrentPostAttribute(\"thematiques\")\n\t);\n\tlet postMainTaxonomy = useSelect(\n\t\t(select) =>\n\t\t\tselect(\"core\").getEntityRecord(\n\t\t\t\t\"taxonomy\",\n\t\t\t\t\"thematiques\",\n\t\t\t\tpostTaxonomies[0]\n\t\t\t),\n\t\t[postTaxonomies]\n\t);\n\tlet postParentTaxonomy = useSelect(\n\t\t(select) => {\n\t\t\tif (postMainTaxonomy) {\n\t\t\t\treturn select(\"core\").getEntityRecord(\n\t\t\t\t\t\"taxonomy\",\n\t\t\t\t\t\"thematiques\",\n\t\t\t\t\tpostMainTaxonomy.parent\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[postMainTaxonomy]\n\t);\n\tlet currentGeneralThematique = postParentTaxonomy ?? postMainTaxonomy ?? null;\n\n\tlet relatedPostsOptions = useSelect(\n\t\t(select) => {\n\t\t\tif (postMainTaxonomy) {\n\t\t\t\treturn select(\"core\").getEntityRecords(\"postType\", \"fiche-questions\", {\n\t\t\t\t\tper_page: -1,\n\t\t\t\t\t_embed: true,\n\t\t\t\t\tthematiques: postMainTaxonomy.id,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[postMainTaxonomy]\n\t);\n\n\tlet currentRelatedPost = useSelect((select) => {\n\t\treturn select(\"core\").getEntityRecord(\n\t\t\t\"postType\",\n\t\t\t\"fiche-questions\",\n\t\t\trelatedPostId\n\t\t);\n\t});\n\n\tconst { pages } = useSelect((select) => {\n\t\tconst { getEntityRecords } = select(\"core\");\n\t\tlet query = {};\n\t\tif (postMainTaxonomy) {\n\t\t\t// Query args\n\t\t\tquery = {\n\t\t\t\tstatus: \"publish\",\n\t\t\t\tper_page: -1,\n\t\t\t\tthematiques: postMainTaxonomy ? postMainTaxonomy.id : null,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tpages: getEntityRecords(\"postType\", \"fiche-questions\", query),\n\t\t};\n\t});\n\n\t// populate options for \n\tlet options = [];\n\tif (pages) {\n\t\toptions.push({ value: 0, label: \"Select a page\" });\n\t\tpages.forEach((page) => {\n\t\t\toptions.push({ value: page.id, label: page.title.rendered });\n\t\t});\n\t} else {\n\t\toptions.push({ value: 0, label: \"Loading...\" });\n\t}\n\n\tif (postMainTaxonomy) {\n\t\t// console.log(postMainTaxonomy.id);\n\t}\n\tif (relatedPostsOptions) {\n\t\t// console.log(relatedPostsOptions);\n\t}\n\n\tif (!relatedPostsOptions) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t

    chargement…

    \n\t\t\t\n\t\t);\n\t}\n\n\tconsole.log(relatedPostId);\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t handleRelatedPostChange(e)}\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t
    \n\t\t\t\t{!relatedPostId && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t

    \n\t\t\t\t\t\t\t{__(\n\t\t\t\t\t\t\t\t\"Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.\",\n\t\t\t\t\t\t\t\t\"homegrade-theme__blocks-texte-fonctionnel\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t

    \n\t\t\t\t\t\n\t\t\t\t)}\n\n\t\t\t\t{currentRelatedPost && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t

    {currentRelatedPost.title.rendered}

    \n\t\t\t\t\t\t{currentRelatedPost.content.raw}\n\t\t\t\t\t\n\t\t\t\t)}\n\t\t\t\t{/* {relatedPostsOptions &&\n\t\t\t\t\trelatedPostsOptions.map((post) => {\n\t\t\t\t\t\treturn
  • {post.title.rendered}
  • ;\n\t\t\t\t\t})} */}\n\t\t\t
    \n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\n\nimport \"./style.scss\";\n\nimport Edit from \"./edit\";\nimport metadata from \"./block.json\";\n\nregisterBlockType(metadata.name, {\n\tedit: Edit,\n});\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// 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\"questions-container/index\": 0,\n\t\"questions-container/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"questions-container/style-index\"], () => (__webpack_require__(\"./src/questions-container/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","RichText","BlockControls","InspectorControls","ToolbarGroup","ToolbarButton","DropdownMenu","ToolbarDropdownMenu","PanelBody","TextControl","TextareaControl","ToggleControl","SelectControl","useSelect","apiFetch","useEffect","useState","RawHTML","Autocomplete","Edit","attributes","setAttributes","_ref","relatedPostId","montexte","handleRelatedPostChange","postId","Number","taxonomiesOptions","setTaxonomiesOptions","postTaxonomies","select","getCurrentPostAttribute","postMainTaxonomy","getEntityRecord","postParentTaxonomy","parent","currentGeneralThematique","relatedPostsOptions","getEntityRecords","per_page","_embed","thematiques","id","currentRelatedPost","pages","query","status","options","push","value","label","forEach","page","title","rendered","createElement","Fragment","console","log","name","onChange","e","content","raw","registerBlockType","metadata","edit"],"sourceRoot":""} \ No newline at end of file diff --git a/build/questions-container/render.php b/build/questions-container/render.php index 038d573..f5f3a92 100644 --- a/build/questions-container/render.php +++ b/build/questions-container/render.php @@ -1,9 +1,18 @@ '; +// print_r($relatedPostID); +// print_r($relatedPost); +echo ''; + ?> -
    - yo +
    +

    post_title ?>

    + post_content ?>
    \ No newline at end of file diff --git a/build/questions-container/style-index.css b/build/questions-container/style-index.css index 7061b83..13e9d75 100644 --- a/build/questions-container/style-index.css +++ b/build/questions-container/style-index.css @@ -7,10 +7,8 @@ * * Replace them with your own styles or remove the file completely. */ -.wp-block-create-block-wpblock-latest-posts { - background-color: #21759b; - color: #fff; - padding: 2px; +.questions-container-block h2 { + font-weight: 800; } /*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file diff --git a/build/questions-container/style-index.css.map b/build/questions-container/style-index.css.map index 584d313..3856fb9 100644 --- a/build/questions-container/style-index.css.map +++ b/build/questions-container/style-index.css.map @@ -1 +1 @@ -{"version":3,"file":"questions-container/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAOA;EACC;EACA;EACA;AAAD,C","sources":["webpack://test-de-block/./src/questions-container/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-create-block-wpblock-latest-posts {\n\tbackground-color: #21759b;\n\tcolor: #fff;\n\tpadding: 2px;\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"questions-container/style-index.css","mappings":";;;AAAA;;;;;EAAA;AAQC;EACC;AADF,C","sources":["webpack://test-de-block/./src/questions-container/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.questions-container-block {\n\th2 {\n\t\tfont-weight: 800;\n\t}\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/wpblock-citation/block.json b/build/wpblock-citation/block.json index 3ae510b..5cd9a77 100644 --- a/build/wpblock-citation/block.json +++ b/build/wpblock-citation/block.json @@ -4,13 +4,13 @@ "name": "create-block/wpblock-citation", "version": "0.1.0", "title": "Wpblock Citation", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": "smiley", "description": "WPBlock de citation", "supports": { "html": false }, - "textdomain": "wpblock-citation", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", diff --git a/build/wpblock-citation/index.asset.php b/build/wpblock-citation/index.asset.php index 54eacb4..f9d9322 100644 --- a/build/wpblock-citation/index.asset.php +++ b/build/wpblock-citation/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '321e3284a01706c81762'); + array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b01194612b22d7be7531'); diff --git a/build/wpblock-citation/index.js b/build/wpblock-citation/index.js index eaaff41..d646915 100644 --- a/build/wpblock-citation/index.js +++ b/build/wpblock-citation/index.js @@ -51,7 +51,8 @@ function Edit({ textAlignment: newAlignment }); } - console.log(citation); + + // console.log(citation); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` wpblock-citation-block text-align-${textAlignment}`, style: { @@ -303,7 +304,7 @@ function _extends() { \*****************************************/ /***/ ((module) => { -module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-citation","version":"0.1.0","title":"Wpblock Citation","category":"wpblock-blocks","icon":"smiley","description":"WPBlock de citation","supports":{"html":false},"textdomain":"wpblock-citation","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"citation":{"type":"string","source":"html","selector":"h2"},"author":{"type":"string","source":"html","selector":"p"},"textAlignment":{"type":"string","default":"left"},"backgroundColor":{"type":"string","default":"#322f9c"},"textColor":{"type":"string","default":"#fff"}}}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-citation","version":"0.1.0","title":"Wpblock Citation","category":"homegrade-blocks","icon":"smiley","description":"WPBlock de citation","supports":{"html":false},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","attributes":{"citation":{"type":"string","source":"html","selector":"h2"},"author":{"type":"string","source":"html","selector":"p"},"textAlignment":{"type":"string","default":"left"},"backgroundColor":{"type":"string","default":"#322f9c"},"textColor":{"type":"string","default":"#fff"}}}'); /***/ }) diff --git a/build/wpblock-citation/index.js.map b/build/wpblock-citation/index.js.map index 48c0422..9e20af3 100644 --- a/build/wpblock-citation/index.js.map +++ b/build/wpblock-citation/index.js.map @@ -1 +1 @@ -{"version":3,"file":"wpblock-citation/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAWJ;AAOF;AAER;AAER,SAASc,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IACLC,QAAQ;IACRC,MAAM;IACNC,aAAa;IACbC,eAAe;IACfC,SAAS;IACTC;EACD,CAAC,GAAGP,UAAU;EACd,MAAMQ,UAAU,GAAGtB,sEAAa,CAAC,CAAC;EAElC,SAASuB,gBAAgBA,CAACC,WAAW,EAAE;IACtCT,aAAa,CAAC;MAAEC,QAAQ,EAAEQ;IAAY,CAAC,CAAC;EACzC;EACA,SAASC,iBAAiBA,CAACC,YAAY,EAAE;IACxCX,aAAa,CAAC;MAAEG,aAAa,EAAEQ;IAAa,CAAC,CAAC;EAC/C;EAEAC,OAAO,CAACC,GAAG,CAACZ,QAAQ,CAAC;EACrB,OACCa,iEAAA,QACK7B,sEAAa,CAAC;IACjB8B,SAAS,EAAG,sCAAqCZ,aAAc,EAAC;IAChEa,KAAK,EAAE;MAAEZ,eAAe,EAAEA,eAAe;MAAEa,KAAK,EAAEZ;IAAU;EAC7D,CAAC,CAAC,EAEFS,iEAAA;IAAKC,SAAS,EAAC;EAAc,GAC5BD,iEAAA,CAAC1B,sEAAiB,QAEjB0B,iEAAA,CAACvB,uEAAkB;IAClB2B,KAAK,EAAC,UAAU;IAChBC,IAAI,EAAC,kBAAkB;IACvBC,WAAW,EAAE,KAAM;IACnBC,aAAa,EAAE,CACd;MACCC,KAAK,EAAElB,eAAe;MACtBmB,QAAQ,EAAGD,KAAK,IAAKtB,aAAa,CAAC;QAAEI,eAAe,EAAEkB;MAAM,CAAC,CAAC;MAC9DE,KAAK,EAAE;IACR,CAAC,EACD;MACCF,KAAK,EAAEjB,SAAS;MAChBkB,QAAQ,EAAGD,KA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UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/wpblock-citation/edit.js","webpack://test-de-block/./src/wpblock-citation/index.js","webpack://test-de-block/./src/wpblock-citation/save.js","webpack://test-de-block/./src/wpblock-citation/editor.scss?4843","webpack://test-de-block/./src/wpblock-citation/style.scss?6dfa","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\n\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToggleControl,\n\tTextControl,\n\tColorPalette,\n\tColorPicker,\n} from \"@wordpress/components\";\n\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\tcitation,\n\t\tauthor,\n\t\ttextAlignment,\n\t\tbackgroundColor,\n\t\ttextColor,\n\t\tshowTest,\n\t} = attributes;\n\tconst blockProps = useBlockProps();\n\n\tfunction onChangeCitation(newCitation) {\n\t\tsetAttributes({ citation: newCitation });\n\t}\n\tfunction onChangeAlignment(newAlignment) {\n\t\tsetAttributes({ textAlignment: newAlignment });\n\t}\n\n\tconsole.log(citation);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t{/* LA méthode pour chopper les couleurs du thème */}\n\t\t\t\t\t setAttributes({ backgroundColor: value }),\n\t\t\t\t\t\t\t\tlabel: \"Couleur de fond\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: textColor,\n\t\t\t\t\t\t\t\tonChange: (value) => setAttributes({ textColor: value }),\n\t\t\t\t\t\t\t\tlabel: \"Couleur de texte\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{/* Controle de block -> toolbar du dessus */}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t setAttributes({ citation: value })}\n\t\t\t\t\tvalue={citation}\n\t\t\t\t\tplaceholder={__(\"Votre Citation\", \"text-box\")}\n\t\t\t\t\ttagName=\"h2\"\n\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t\tstyle={{ textAlign: textAlignment }}\n\t\t\t\t/>\n\t\t\t\t setAttributes({ author: value })}\n\t\t\t\t\tvalue={author}\n\t\t\t\t\tplaceholder={__(\"auteur\", \"text-box\")}\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t\tstyle={{ textAlign: textAlignment }}\n\t\t\t\t/>\n\t\t\t
    \n\t\t\n\t);\n}\n","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\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#0414eb\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { citation, author, textAlignment, backgroundColor, textColor } =\n\t\tattributes;\n\n\treturn (\n\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n ","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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\"wpblock-citation/index\": 0,\n\t\"wpblock-citation/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"wpblock-citation/style-index\"], () => (__webpack_require__(\"./src/wpblock-citation/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","PanelBody","ToggleControl","TextControl","ColorPalette","ColorPicker","Edit","attributes","setAttributes","citation","author","textAlignment","backgroundColor","textColor","showTest","blockProps","onChangeCitation","newCitation","onChangeAlignment","newAlignment","console","log","createElement","className","style","color","title","icon","initialOpen","colorSettings","value","onChange","label","_extends","placeholder","tagName","allowedFormats","textAlign","registerBlockType","save","metadata","name","src","id","viewBox","d","foreground","edit","Content"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"wpblock-citation/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAqC;AAWJ;AAOF;AAER;AAER,SAASc,IAAIA,CAAC;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAE;EAC3D,MAAM;IACLC,QAAQ;IACRC,MAAM;IACNC,aAAa;IACbC,eAAe;IACfC,SAAS;IACTC;EACD,CAAC,GAAGP,UAAU;EACd,MAAMQ,UAAU,GAAGtB,sEAAa,CAAC,CAAC;EAElC,SAASuB,gBAAgBA,CAACC,WAAW,EAAE;IACtCT,aAAa,CAAC;MAAEC,QAAQ,EAAEQ;IAAY,CAAC,CAAC;EACzC;EACA,SAASC,iBAAiBA,CAACC,YAAY,EAAE;IACxCX,aAA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AAK,EAAEV;IAAU;EAC7D,CAAC,CAAC,EAEDO,iEAAA,CAACzB,6DAAQ,CAACmD,OAAO;IAChBb,OAAO,EAAC,IAAI;IACZL,KAAK,EAAEnB,QAAS;IAChBY,SAAS,EAAC;EAA2B,CACrC,CAAC,EACHD,iEAAA,CAACzB,6DAAQ,CAACmD,OAAO;IAChBb,OAAO,EAAC,GAAG;IACXL,KAAK,EAAElB,MAAO;IACdW,SAAS,EAAC;EAAyB,CACnC,CACG,CAAC;AAER;;;;;;;;;;;ACzBA;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACAe;AACf;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;UCbA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://test-de-block/./src/wpblock-citation/edit.js","webpack://test-de-block/./src/wpblock-citation/index.js","webpack://test-de-block/./src/wpblock-citation/save.js","webpack://test-de-block/./src/wpblock-citation/editor.scss?4843","webpack://test-de-block/./src/wpblock-citation/style.scss?6dfa","webpack://test-de-block/external window [\"wp\",\"blockEditor\"]","webpack://test-de-block/external window [\"wp\",\"blocks\"]","webpack://test-de-block/external window [\"wp\",\"components\"]","webpack://test-de-block/external window [\"wp\",\"element\"]","webpack://test-de-block/external window [\"wp\",\"i18n\"]","webpack://test-de-block/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://test-de-block/webpack/bootstrap","webpack://test-de-block/webpack/runtime/chunk loaded","webpack://test-de-block/webpack/runtime/compat get default export","webpack://test-de-block/webpack/runtime/define property getters","webpack://test-de-block/webpack/runtime/hasOwnProperty shorthand","webpack://test-de-block/webpack/runtime/make namespace object","webpack://test-de-block/webpack/runtime/jsonp chunk loading","webpack://test-de-block/webpack/before-startup","webpack://test-de-block/webpack/startup","webpack://test-de-block/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\n\nimport {\n\tuseBlockProps,\n\tInnerBlocks,\n\tRichText,\n\tInspectorControls,\n\tAlignmentToolbar,\n\tBlockControls,\n\tPanelColorSettings,\n\tContrastChecker,\n} from \"@wordpress/block-editor\";\nimport {\n\tPanelBody,\n\tToggleControl,\n\tTextControl,\n\tColorPalette,\n\tColorPicker,\n} from \"@wordpress/components\";\n\nimport \"./editor.scss\";\n\nexport default function Edit({ attributes, setAttributes }) {\n\tconst {\n\t\tcitation,\n\t\tauthor,\n\t\ttextAlignment,\n\t\tbackgroundColor,\n\t\ttextColor,\n\t\tshowTest,\n\t} = attributes;\n\tconst blockProps = useBlockProps();\n\n\tfunction onChangeCitation(newCitation) {\n\t\tsetAttributes({ citation: newCitation });\n\t}\n\tfunction onChangeAlignment(newAlignment) {\n\t\tsetAttributes({ textAlignment: newAlignment });\n\t}\n\n\t// console.log(citation);\n\treturn (\n\t\t\n\t\t\t
    \n\t\t\t\t\n\t\t\t\t\t{/* LA méthode pour chopper les couleurs du thème */}\n\t\t\t\t\t setAttributes({ backgroundColor: value }),\n\t\t\t\t\t\t\t\tlabel: \"Couleur de fond\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvalue: textColor,\n\t\t\t\t\t\t\t\tonChange: (value) => setAttributes({ textColor: value }),\n\t\t\t\t\t\t\t\tlabel: \"Couleur de texte\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]}\n\t\t\t\t\t>\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t{/* Controle de block -> toolbar du dessus */}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t setAttributes({ citation: value })}\n\t\t\t\t\tvalue={citation}\n\t\t\t\t\tplaceholder={__(\"Votre Citation\", \"text-box\")}\n\t\t\t\t\ttagName=\"h2\"\n\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t\tstyle={{ textAlign: textAlignment }}\n\t\t\t\t/>\n\t\t\t\t setAttributes({ author: value })}\n\t\t\t\t\tvalue={author}\n\t\t\t\t\tplaceholder={__(\"auteur\", \"text-box\")}\n\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\tallowedFormats={[]}\n\t\t\t\t\tstyle={{ textAlign: textAlignment }}\n\t\t\t\t/>\n\t\t\t
    \n\t\t\n\t);\n}\n","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\t\n\t\t\t\t\n\t\t\t\n\t\t),\n\t\tforeground: \"#0414eb\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, RichText, InnerBlocks } from \"@wordpress/block-editor\";\n\nexport default function save({ attributes }) {\n\tconst { citation, author, textAlignment, backgroundColor, textColor } =\n\t\tattributes;\n\n\treturn (\n\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t);\n}\n ","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","// 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\"wpblock-citation/index\": 0,\n\t\"wpblock-citation/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[\"webpackChunktest_de_block\"] = globalThis[\"webpackChunktest_de_block\"] || [];\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, [\"wpblock-citation/style-index\"], () => (__webpack_require__(\"./src/wpblock-citation/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","RichText","InspectorControls","AlignmentToolbar","BlockControls","PanelColorSettings","ContrastChecker","PanelBody","ToggleControl","TextControl","ColorPalette","ColorPicker","Edit","attributes","setAttributes","citation","author","textAlignment","backgroundColor","textColor","showTest","blockProps","onChangeCitation","newCitation","onChangeAlignment","newAlignment","createElement","className","style","color","title","icon","initialOpen","colorSettings","value","onChange","label","_extends","placeholder","tagName","allowedFormats","textAlign","registerBlockType","save","metadata","name","src","id","viewBox","d","foreground","edit","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/build/wpblock-cover/block.json b/build/wpblock-cover/block.json index 7068ee2..e67fb31 100644 --- a/build/wpblock-cover/block.json +++ b/build/wpblock-cover/block.json @@ -4,7 +4,7 @@ "name": "create-block/wpblock-cover", "version": "0.1.0", "title": "Wpblock Cover", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": { "background": "#fff", "foreground": "#0414eb", @@ -42,7 +42,7 @@ "attribute": "src" } }, - "textdomain": "wpblock-cover", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css" diff --git a/build/wpblock-cover/index.asset.php b/build/wpblock-cover/index.asset.php index a1deade..e8e4a5a 100644 --- a/build/wpblock-cover/index.asset.php +++ b/build/wpblock-cover/index.asset.php @@ -1 +1 @@ - array('wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '529933f8df7f7b5f7f13'); + array('wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'b5c155da42714eb35d8d'); diff --git a/build/wpblock-cover/index.js b/build/wpblock-cover/index.js index e073de5..25bf247 100644 --- a/build/wpblock-cover/index.js +++ b/build/wpblock-cover/index.js @@ -341,7 +341,7 @@ module.exports = window["wp"]["i18n"]; \**************************************/ /***/ ((module) => { -module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-cover","version":"0.1.0","title":"Wpblock Cover","category":"wpblock-blocks","icon":{"background":"#fff","foreground":"#0414eb","src":"cover-image"},"description":"Example block scaffolded with Create Block tool.","supports":{"html":false},"attributes":{"coverId":{"type":"number"},"title":{"type":"string","source":"html","selector":"h2"},"subtitle":{"type":"string","source":"html","selector":"h3"},"coverAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"coverUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src"}},"textdomain":"wpblock-cover","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'); +module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"create-block/wpblock-cover","version":"0.1.0","title":"Wpblock Cover","category":"homegrade-blocks","icon":{"background":"#fff","foreground":"#0414eb","src":"cover-image"},"description":"Example block scaffolded with Create Block tool.","supports":{"html":false},"attributes":{"coverId":{"type":"number"},"title":{"type":"string","source":"html","selector":"h2"},"subtitle":{"type":"string","source":"html","selector":"h3"},"coverAlt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"coverUrl":{"type":"string","source":"attribute","selector":"img","attribute":"src"}},"textdomain":"homegrade-theme__bloks-texte-fonctionnel","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'); /***/ }) diff --git a/homegrade-content-blocks.php b/homegrade-content-blocks.php index 755ac57..60a60bc 100644 --- a/homegrade-content-blocks.php +++ b/homegrade-content-blocks.php @@ -14,26 +14,71 @@ */ +include_once('templates.php'); + function create_block_test_de_block_block_init() { - register_block_type(__DIR__ . '/build/blocka'); - register_block_type(__DIR__ . '/build/questions-container'); - register_block_type(__DIR__ . '/build/dynamic-posts'); - register_block_type(__DIR__ . '/build/nested-parent'); - register_block_type(__DIR__ . '/build/wpblock-cover'); - register_block_type(__DIR__ . '/build/wpblock-citation'); + register_block_type(__DIR__ . '/build/chapter-header'); + register_block_type(__DIR__ . '/build/questions-container'); + register_block_type(__DIR__ . '/build/questions-container-auto'); + register_block_type(__DIR__ . '/build/content-heading'); + register_block_type(__DIR__ . '/build/points-cles'); + // register_block_type(__DIR__ . '/build/wpblock-cover'); + // register_block_type(__DIR__ . '/build/wpblock-citation'); } add_action('init', 'create_block_test_de_block_block_init'); + +function homegrade_allowed_block_types($allowed_blocks, $editor_context) +{ + if ('conseils' === $editor_context->post->post_type) { + $allowed_blocks = array( + 'core/paragraph', + 'core/list', + 'core/list-item', + 'homegrade-content-blocks/chapter-header', + 'homegrade-content-blocks/points-cles', + 'homegrade-content-blocks/questions-container' + ); + } + + add_filter('homegrade_allowed_block_types', 'misha_allowed_block_types', 25, 2); + + if ('fiche-questions' === $editor_context->post->post_type) { + $allowed_blocks = array( + 'core/paragraph', + 'core/heading', + 'core/list', + 'core/list-item', + 'homegrade-content-blocks/chapter-header', + 'homegrade-content-blocks/points-cles', + 'homegrade-content-blocks/questions-container' + ); + } + + return $allowed_blocks; + + ####ONLY DEREGISTER FEW BLOCKS + // get all the registered blocks + // $blocks = WP_Block_Type_Registry::get_instance()->get_all_registered(); + + // then disable some of them + // unset($blocks['core/paragraph']); + // unset($blocks['core/heading']); + + // return the new list of allowed blocks + // return array_keys($blocks); +} + function wpblock_add_block_categories($categories) { return array_merge( [ [ - 'slug' => 'wpblock-blocks', - 'title' => __('WpBlocks Serie ', 'block-course'), + 'slug' => 'homegrade-blocks', + 'title' => __('Blocs Homegrade ', 'block-course'), 'icon' => 'heart', ], @@ -41,7 +86,21 @@ function wpblock_add_block_categories($categories) $categories ); } -add_action('block_categories', 'wpblock_add_block_categories', 10, 2); +add_action('block_categories', 'wpblock_add_block_categories', 25, 2); + + +function blocks_course_plugin_enqueue_assets() +{ + $asset_file = include(plugin_dir_path(__FILE__) . 'build/index.asset.php'); + wp_enqueue_script('homegrade-content-blocks', plugins_url('build/filters/filters.js', __FILE__), $asset_file['dependencies'], $asset_file['version']); +} + +add_action('enqueue_block_editor_assets', 'blocks_course_plugin_enqueue_assets'); + + + + + if (function_exists("getThematiqueFamilySlug")) { function getThematiqueFamilySlug($thematique_slug) diff --git a/package-lock.json b/package-lock.json index f3ee69f..b7b1581 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "0.1.0", "license": "GPL-2.0-or-later", "dependencies": { - "@wordpress/blob": "^3.35.0" + "@wordpress/blob": "^3.35.0", + "@wordpress/hooks": "^3.38.0" }, "devDependencies": { "@wordpress/scripts": "^26.6.0" @@ -4150,6 +4151,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@wordpress/hooks": { + "version": "3.38.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.38.0.tgz", + "integrity": "sha512-ca7hRc/3XGkJ1JangXXq25zOUHi/LWXvzHVh7w+JytvVlV+tHhO/OoES6RZ19xtYnuTMd+vpi7/hukbQRG/Z4Q==", + "dependencies": { + "@babel/runtime": "^7.16.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@wordpress/jest-console": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.6.0.tgz", @@ -19238,6 +19250,14 @@ } } }, + "@wordpress/hooks": { + "version": "3.38.0", + "resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-3.38.0.tgz", + "integrity": "sha512-ca7hRc/3XGkJ1JangXXq25zOUHi/LWXvzHVh7w+JytvVlV+tHhO/OoES6RZ19xtYnuTMd+vpi7/hukbQRG/Z4Q==", + "requires": { + "@babel/runtime": "^7.16.0" + } + }, "@wordpress/jest-console": { "version": "7.6.0", "resolved": "https://registry.npmjs.org/@wordpress/jest-console/-/jest-console-7.6.0.tgz", diff --git a/package.json b/package.json index a7c2d37..7850c4d 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@wordpress/scripts": "^26.6.0" }, "dependencies": { - "@wordpress/blob": "^3.35.0" + "@wordpress/blob": "^3.35.0", + "@wordpress/hooks": "^3.38.0" } -} +} \ No newline at end of file diff --git a/readme.txt b/readme.txt index 065ffba..2ecbbb1 100644 --- a/readme.txt +++ b/readme.txt @@ -1,55 +1,3 @@ -=== Test De Block === -Contributors: The WordPress Contributors -Tags: block -Tested up to: 6.1 -Stable tag: 0.1.0 -License: GPL-2.0-or-later -License URI: https://www.gnu.org/licenses/gpl-2.0.html +=== Homegrade content blocks === -Example block scaffolded with Create Block tool. - -== Description == - -This is the long description. No limit, and you can use Markdown (as well as in the following sections). - -For backwards compatibility, if this section is missing, the full length of the short description will be used, and -Markdown parsed. - -== Installation == - -This section describes how to install the plugin and get it working. - -e.g. - -1. Upload the plugin files to the `/wp-content/plugins/test-de-block` directory, or install the plugin through the WordPress plugins screen directly. -1. Activate the plugin through the 'Plugins' screen in WordPress - - -== Frequently Asked Questions == - -= A question that someone might have = - -An answer to that question. - -= What about foo bar? = - -Answer to foo bar dilemma. - -== Screenshots == - -1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from -the /assets directory or the directory that contains the stable readme.txt (tags or trunk). Screenshots in the /assets -directory take precedence. For example, `/assets/screenshot-1.png` would win over `/tags/4.3/screenshot-1.png` -(or jpg, jpeg, gif). -2. This is the second screen shot - -== Changelog == - -= 0.1.0 = -* Release - -== Arbitrary section == - -You may provide arbitrary sections, in the same format as the ones above. This may be of use for extremely complicated -plugins where more information needs to be conveyed that doesn't fit into the categories of "description" or -"installation." Arbitrary sections will be shown below the built-in sections outlined above. +Un série de Blocks sur mesure pour l'écriture du contenu Homegrade \ No newline at end of file diff --git a/src/blocka/block.json b/src/__blocka/block.json similarity index 100% rename from src/blocka/block.json rename to src/__blocka/block.json diff --git a/src/blocka/edit.js b/src/__blocka/edit.js similarity index 100% rename from src/blocka/edit.js rename to src/__blocka/edit.js diff --git a/src/blocka/editor.scss b/src/__blocka/editor.scss similarity index 100% rename from src/blocka/editor.scss rename to src/__blocka/editor.scss diff --git a/src/blocka/index.js b/src/__blocka/index.js similarity index 100% rename from src/blocka/index.js rename to src/__blocka/index.js diff --git a/src/blocka/save.js b/src/__blocka/save.js similarity index 100% rename from src/blocka/save.js rename to src/__blocka/save.js diff --git a/src/blocka/style.scss b/src/__blocka/style.scss similarity index 100% rename from src/blocka/style.scss rename to src/__blocka/style.scss diff --git a/src/dynamic-posts/block.json b/src/__dynamic-posts/block.json similarity index 100% rename from src/dynamic-posts/block.json rename to src/__dynamic-posts/block.json diff --git a/src/dynamic-posts/edit.js b/src/__dynamic-posts/edit.js similarity index 100% rename from src/dynamic-posts/edit.js rename to src/__dynamic-posts/edit.js diff --git a/src/dynamic-posts/editor.scss b/src/__dynamic-posts/editor.scss similarity index 100% rename from src/dynamic-posts/editor.scss rename to src/__dynamic-posts/editor.scss diff --git a/src/dynamic-posts/index.js b/src/__dynamic-posts/index.js similarity index 100% rename from src/dynamic-posts/index.js rename to src/__dynamic-posts/index.js diff --git a/src/dynamic-posts/render.php b/src/__dynamic-posts/render.php similarity index 100% rename from src/dynamic-posts/render.php rename to src/__dynamic-posts/render.php diff --git a/src/dynamic-posts/save.js b/src/__dynamic-posts/save.js similarity index 100% rename from src/dynamic-posts/save.js rename to src/__dynamic-posts/save.js diff --git a/src/dynamic-posts/style.scss b/src/__dynamic-posts/style.scss similarity index 100% rename from src/dynamic-posts/style.scss rename to src/__dynamic-posts/style.scss diff --git a/src/nested-parent/block.json b/src/__nested-parent/block.json similarity index 74% rename from src/nested-parent/block.json rename to src/__nested-parent/block.json index eb08f8c..2af5778 100644 --- a/src/nested-parent/block.json +++ b/src/__nested-parent/block.json @@ -1,15 +1,15 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 2, - "name": "homegrade-content-blocks//nested-parent", + "name": "homegrade-content-blocks/nested-parent", "version": "0.1.0", "title": "Wpblock Nested Parent", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "description": "Parent Nested. #Nested", "supports": { "html": false }, - "textdomain": "nested-parent", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", diff --git a/src/nested-parent/edit.js b/src/__nested-parent/edit.js similarity index 100% rename from src/nested-parent/edit.js rename to src/__nested-parent/edit.js diff --git a/src/nested-parent/editor.scss b/src/__nested-parent/editor.scss similarity index 100% rename from src/nested-parent/editor.scss rename to src/__nested-parent/editor.scss diff --git a/src/nested-parent/index.js b/src/__nested-parent/index.js similarity index 100% rename from src/nested-parent/index.js rename to src/__nested-parent/index.js diff --git a/src/__nested-parent/nested-children/block.json b/src/__nested-parent/nested-children/block.json new file mode 100644 index 0000000..c32119f --- /dev/null +++ b/src/__nested-parent/nested-children/block.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "wpblocks-multiple/nested-children", + "version": "0.1.0", + "title": "Nested Childrenes", + "category": "homegrade-blocks", + "icon": { + "background": "#0414eb", + "foreground": "#fff", + "src": "admin-plugins" + }, + "description": "Children Nested. #ChildrenNested", + "supports": { + "html": false, + "reusable": false + }, + "textdomain": "nested-parent", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "attributes": { + "userName": { + "type": "string" + }, + "userPosition": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/src/nested-parent/nested-children/edit.js b/src/__nested-parent/nested-children/edit.js similarity index 100% rename from src/nested-parent/nested-children/edit.js rename to src/__nested-parent/nested-children/edit.js diff --git a/src/nested-parent/nested-children/editor.scss b/src/__nested-parent/nested-children/editor.scss similarity index 100% rename from src/nested-parent/nested-children/editor.scss rename to src/__nested-parent/nested-children/editor.scss diff --git a/src/nested-parent/nested-children/index.js b/src/__nested-parent/nested-children/index.js similarity index 100% rename from src/nested-parent/nested-children/index.js rename to src/__nested-parent/nested-children/index.js diff --git a/src/nested-parent/nested-children/index_bot.js b/src/__nested-parent/nested-children/index_bot.js similarity index 100% rename from src/nested-parent/nested-children/index_bot.js rename to src/__nested-parent/nested-children/index_bot.js diff --git a/src/nested-parent/nested-children/save.js b/src/__nested-parent/nested-children/save.js similarity index 100% rename from src/nested-parent/nested-children/save.js rename to src/__nested-parent/nested-children/save.js diff --git a/src/nested-parent/nested-children/style.scss b/src/__nested-parent/nested-children/style.scss similarity index 100% rename from src/nested-parent/nested-children/style.scss rename to src/__nested-parent/nested-children/style.scss diff --git a/src/nested-parent/save.js b/src/__nested-parent/save.js similarity index 100% rename from src/nested-parent/save.js rename to src/__nested-parent/save.js diff --git a/src/nested-parent/style.scss b/src/__nested-parent/style.scss similarity index 100% rename from src/nested-parent/style.scss rename to src/__nested-parent/style.scss diff --git a/src/chapter-header/block.json b/src/chapter-header/block.json index 7e93b17..17064a5 100644 --- a/src/chapter-header/block.json +++ b/src/chapter-header/block.json @@ -1,16 +1,16 @@ { "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 2, - "name": "homegrade-multiple/chapter-header", + "name": "homegrade-content-blocks/chapter-header", "version": "0.1.0", "title": "Chapter Header", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": { "background": "#fff", "foreground": "#DF1E1E", "src": "feedback" }, - "description": "Un bloc dynamique qui affiche le titres de chapitre", + "description": "Un bloc automatique pour afficher le bandeau de titrage de la page conseil courante", "supports": { "html": false }, diff --git a/src/chapter-header/edit.js b/src/chapter-header/edit.js index ea1e737..7ad063d 100644 --- a/src/chapter-header/edit.js +++ b/src/chapter-header/edit.js @@ -64,6 +64,7 @@ export default function Edit({ attributes, setAttributes }) { : postMainTaxonomy ? getThematiqueFamilySlug(postMainTaxonomy.slug) : null; + let currentGeneralThematiqueCover = useSelect( (select) => { if (currentGeneralThematique) { @@ -84,17 +85,16 @@ export default function Edit({ attributes, setAttributes }) { } if (postMainTaxonomy && postTitle && currentGeneralThematique) { - console.log(postMainTaxonomy); - return (
    +

    - {postMainTaxonomy.name} + {currentGeneralThematique.name}

    - {postParentTaxonomy && Télécharger la brochure } + {postParentTaxonomy && ( +

    + Télécharger la brochure{" "} +

    + )}
    {currentGeneralThematiqueCover && ( '; -$thematique = get_the_terms(get_the_ID(), 'thematiques')[0]; +$thematique = get_the_terms(get_the_ID(), 'thematiques')[0] ?? null; $thematique_generale = $thematique->parent ? get_term($thematique->parent, 'thematiques') : $thematique; $thematique_picture = get_field('taxonomy_pictures', "thematiques_" . $thematique_generale->term_id)['illustration_s']; +$lastUpdate = get_the_modified_date('', get_the_ID()); +$args = array( + // 'fields' => 'ids', + 'post_type' => 'brochures', + 'posts_per_page' => 1, + 'tax_query' => array( + array( + 'taxonomy' => 'thematiques', + 'field' => 'term_id', + 'terms' => $thematique->term_id + ) + ) +); +$relatedBrochuresPosts = get_posts($args); +$relatedBrochure = get_field('brochures', $relatedBrochuresPosts[0]->ID); +$hasBrochure = $relatedBrochure['file_fr']['url'] ? true : false; -echo '
    ';
    -// print_r(getThematiqueFamilySlug($thematique->slug));
    -// print_r(getThematiqueFamilySlug("acoustique"));
    -// print_r("salut");
    -// print_r($thematique);
    -// print_r($thematique_generale);
    -// print_r($thematique_picture);
    -echo '
    '; +// echo '
    ';
    +// // print_r($relatedBrochures[0]);
    +// // print_r($relatedBrochure['file_fr']['url'] ? "yes" : "no");
    +// // print_r(getThematiqueFamilySlug("acoustique"));
    +// // print_r("salut");
    +// // print_r($thematique);
    +// // print_r($thematique_generale);
    +// // print_r($thematique_picture);
    +// echo '
    '; ?> -
    slug) . "-light" ?>">
    -

    slug) ?>">name ?>

    + parent == 0) : ?> + +

    slug) ?>">

    + +

    slug) ?>">name ?>

    + + +

    - Télécharger la brochure + + + Télécharger la brochure post_title ?> + + + + + + +
    \ No newline at end of file diff --git a/src/chapter-header/style.scss b/src/chapter-header/style.scss index b71a721..6659cd6 100644 --- a/src/chapter-header/style.scss +++ b/src/chapter-header/style.scss @@ -9,9 +9,9 @@ display: flex; justify-content: space-between; align-items: center; - + margin-bottom: 20px; + &__page-thematic-cover { max-width: 400px; } - } diff --git a/src/content-heading/block.json b/src/content-heading/block.json new file mode 100644 index 0000000..4e683ef --- /dev/null +++ b/src/content-heading/block.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "homegrade-content-blocks/content-heading", + "version": "0.1.0", + "title": "Titre", + "category": "homegrade-blocks", + "icon": "smiley", + "description": "Bloc de titrage", + "supports": { + "html": false + }, + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "attributes": { + "title": { + "type": "string", + "source": "html", + "selector": "h3" + } + } +} \ No newline at end of file diff --git a/src/content-heading/edit.js b/src/content-heading/edit.js new file mode 100644 index 0000000..89c000a --- /dev/null +++ b/src/content-heading/edit.js @@ -0,0 +1,49 @@ +import { __ } from "@wordpress/i18n"; + +import { + useBlockProps, + InnerBlocks, + RichText, + InspectorControls, + AlignmentToolbar, + BlockControls, + PanelColorSettings, + ContrastChecker, +} from "@wordpress/block-editor"; +import { + PanelBody, + ToggleControl, + TextControl, + ColorPalette, + ColorPicker, +} from "@wordpress/components"; + +import "./editor.scss"; + +export default function Edit({ attributes, setAttributes }) { + const { title } = attributes; + const blockProps = useBlockProps(); + + function onChangeCitation(newCitation) { + setAttributes({ citation: newCitation }); + } + + return ( + <> + + + + + setAttributes({ title: value })} + value={title} + placeholder={__( + "Insérez votre titre ici", + "homegrade-theme__bloks-texte-fonctionnel" + )} + tagName="h3" + /> + + ); +} diff --git a/src/content-heading/editor.scss b/src/content-heading/editor.scss new file mode 100644 index 0000000..d0c9866 --- /dev/null +++ b/src/content-heading/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +// .block-editor-image-size-control { +// display: none; +// } diff --git a/src/content-heading/index.js b/src/content-heading/index.js new file mode 100644 index 0000000..159aef8 --- /dev/null +++ b/src/content-heading/index.js @@ -0,0 +1,27 @@ +import { registerBlockType } from "@wordpress/blocks"; + +import "./style.scss"; + +import Edit from "./edit"; +import save from "./save"; +import metadata from "./block.json"; + +registerBlockType(metadata.name, { + icon: { + src: ( + + ), + foreground: "#DF1E1E", + }, + edit: Edit, + save, +}); diff --git a/src/content-heading/save.js b/src/content-heading/save.js new file mode 100644 index 0000000..e53932d --- /dev/null +++ b/src/content-heading/save.js @@ -0,0 +1,15 @@ +import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; + +export default function save({ attributes }) { + const { title } = attributes; + + return ( + <> + + + ); +} diff --git a/src/content-heading/style.scss b/src/content-heading/style.scss new file mode 100644 index 0000000..a72b660 --- /dev/null +++ b/src/content-heading/style.scss @@ -0,0 +1,62 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wpblock-citation-block { + position: relative; + padding: 80px 20px; + margin-top: 50px !important; + margin-bottom: 50px !important; + + .wpblock-citation-citation { + font-weight: 600; + font-size: 50px; + line-height: 1.2; + text-transform: unset; + padding-bottom: 50px; + } + .wpblock-citation-author { + padding-top: 20px; + } + + .wpblock-citation-citation, + .wpblock-citation-author { + max-width: 1040px; + margin: 0; + } + + &.text-align-right { + padding-right: 50px; + text-align: right; + .wpblock-citation-citation, + .wpblock-citation-author { + margin-left: auto; + } + } + &.text-align-left { + padding-left: 50px; + text-align: left; + } + &.text-align-center { + text-align: center; + + .wpblock-citation-citation, + .wpblock-citation-author { + margin: 0 auto; + } + } + + figure, + img { + width: 100%; + height: 250px; + } + img { + object-fit: cover; + filter: brightness(0.3) grayscale(100%) sepia(100%) hue-rotate(200deg) + opacity(0.5); + } +} diff --git a/src/points-cles/.DS_Store b/src/points-cles/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..af46be061667b25f890c675a4a2baa2d24a751e4 GIT binary patch literal 6148 zcmeHK-AcnS6i&A3Hipm(MK1&14&25ViZ`Xs7qFriDzl|y7Q1AuoxK=?-s%haCO(hn zBq=zyYY}%2B;WZ>nh%;E#u)b&QI|1?G1h>F$WhrM=-wKt*knYGW2Cb%Q6X5L;mpSV zI^efgSvmjffUNC<^>sF~GEcGC~i^uuM zIlNLb3t~B*>w-8ML(1cQEF+bBY9XUk*ZL;V1Q|KU%jKZk7QOS{sx6imy-r*72mRHm z**H2qySy2_CR3^24VxUu)^cF6gbz^cV&43@Oq85}r_3(12#En=fEXYKcANowFf>{_ z&I2u<7$62V8NmHPKtpsb76$d!0UchSF +
    +
    +
    + +
    +

    + {__("Les points clés", "homegrade-theme__bloks-texte-fonctionnel")} +

    +
    + + +
    + + ); +} diff --git a/src/points-cles/editor.scss b/src/points-cles/editor.scss new file mode 100644 index 0000000..3f654a3 --- /dev/null +++ b/src/points-cles/editor.scss @@ -0,0 +1,26 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-homegrade-content-blocks-points-cles { + ul { + li { + list-style: none !important; + display: flex; + padding: 10px 0; + } + li:before { + transform: translateY(6px); + flex-shrink: 0; + border-radius: 50%; + content: ""; + width: 10px; + height: 10px; + display: inline-block; + background-color: red; + margin-right: 10px; + } + } +} diff --git a/src/points-cles/img/icon_feather_key.png b/src/points-cles/img/icon_feather_key.png new file mode 100644 index 0000000000000000000000000000000000000000..b909ba2f4f3ed04ef111676806eeb97f6f1d4ae8 GIT binary patch literal 8389 zcmXYVcRbtQ_y0@OCRSsX65Y0L^+@hH_n!Ma=XvhybrNkrwKqEHC&>!{c zh(l@a$etOgGPV2uwQCpv7sAo@vY6(xyadn@ENseMkumhhi!jz~4dc$|6Z9H6F^lhR zG&(+ri!qBgwvgMtJX=y961YPq|Ni>Bm6T078^(+O0xYWo9gb980I*Am2?+JU-#??Mb_XDU$As7www{H*;mvy2OaOrtU>?p! zVxUMi0D8rYdM^UKTmas%_CI7Un-*o5-5O- z8|qge$}ND6ahQP!gwO%J!zshXE)c3Hu%;iR)FIe5D!?xhmCUSc17I^$LMhyypFpxI%`tkVfi;ZccJpTK;^NWIu9j@5ts~WYX&L!m0zwb>~-C{vVfJces+^-rS$o7my18i_XZ- zwDro$B&A0W1>X0gOPM(^jRc(LPAqTF(7iLG9}PT-$H<*2^XKO2^(yjRqGw0bFW0k|k#g3bq;`TJu77DD#T-1km z^?DUT%2b}DSZWCEi+Wv@Pq0uvO`ho$kcvBtYgLy_4Xe?o`~vY+ZYsUZ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}y)4wc4D9)1O8j4f!s)NkSFr;!oCF{AA9DdPqU;YRG z-UCGFm%3jM5b5uQKC}z?yuM4CRRfpX?L(m0R4_uU-?ZIe zGTvLp6!tTSW?r9u7PKI?l-b1GdmHTO;?SzE*i({XKd@wcF1Uz)`q);lOzGw4#;>6w zeN|%*I}(@gNpJn6_4dBg)Y|eGRpS{psx2zxk`Y4_{oIFeF|1ytk<-m{V?=5hN-!bK zhI{ed?dmxbRY8eLyJSqsU!Pu2enrV}T<diC{>)$N=;2Cy<&%U2vCXnQ&SzJdk z3LLwiRb1xzPx8&Fbu|k=vFjq010nn;(xl1ZidRjz-poAjtr0M zz98C~>g}a*52lXRG?S`usZ`KX6vufn1u;%1SrL!Te>#`9$0LDTLp)l=`^l*Xd@{%Z zhfa`MFd6C@9>=0p*)uDM&%K9xX2iEwPjd>Zz@^uu&7&uJVvlc0+n~le9X9c&i#*x9 z33J-Djg-VVHobMc0+st?!`n~UANG|}bL?*ZAYRh-%_|9T7r0u)k0MlC@^63AW$|8N zjlw2)@fpdb$>ZGia76E2_RdRgEQhsEQa9hxzo8YG|5_6*9FfD{>Lu@!tvf8QQ}x+Z zi;=FO>wLidlVHBFXh-mbS`)PVMFzBDME)yz@BC2I}_jZ97AL6b(ABvCqYo8)^g!YIc z@Vi0Gp)ee;z*zOk46r7=%h$RHL-DaT0lORovj(ba#_A>y2HwW38liLHT28Mp + + diff --git a/src/points-cles/index.js b/src/points-cles/index.js new file mode 100644 index 0000000..16c28e3 --- /dev/null +++ b/src/points-cles/index.js @@ -0,0 +1,32 @@ +import { registerBlockType } from "@wordpress/blocks"; +import { __ } from "@wordpress/i18n"; +import "./style.scss"; + +import "./nested-children"; + +import Edit from "./edit"; +import save from "./save"; +import metadata from "./block.json"; + +registerBlockType(metadata.name, { + icon: { + src: ( + + + + + + + + + + ), + foreground: "#DF1E1E", + }, + edit: Edit, + save, +}); diff --git a/src/nested-parent/nested-children/block.json b/src/points-cles/nested-children/block.json similarity index 100% rename from src/nested-parent/nested-children/block.json rename to src/points-cles/nested-children/block.json diff --git a/src/points-cles/nested-children/edit.js b/src/points-cles/nested-children/edit.js new file mode 100644 index 0000000..7f20aa1 --- /dev/null +++ b/src/points-cles/nested-children/edit.js @@ -0,0 +1,29 @@ +import { __ } from "@wordpress/i18n"; +import { + useBlockProps, + InnerBlocks, + RichText, + InspectorControls, + AlignmentToolbar, + BlockControls, + PanelColorSettings, + ContrastChecker, +} from "@wordpress/block-editor"; +import "./editor.scss"; +export default function Edit({ attributes, setAttributes }) { + const { userName, userPosition } = attributes; + return ( +
    + setAttributes({ userName: value })} + value={userName} + placeholder={__("UserName Here", "text-box")} + tagName="p" + allowedFormats={[]} + /> + +

    {userPosition}

    +
    + ); +} diff --git a/src/points-cles/nested-children/editor.scss b/src/points-cles/nested-children/editor.scss new file mode 100644 index 0000000..3c8e77d --- /dev/null +++ b/src/points-cles/nested-children/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-blocka { + border: 1px dotted #f00; +} diff --git a/src/points-cles/nested-children/index.js b/src/points-cles/nested-children/index.js new file mode 100644 index 0000000..90e9f20 --- /dev/null +++ b/src/points-cles/nested-children/index.js @@ -0,0 +1,17 @@ +import { registerBlockType } from "@wordpress/blocks"; +import "./style.scss"; +import metadata from "./block.json"; + +import Edit from "./edit"; +import Save from "./save"; + +registerBlockType(metadata.name, { + title: metadata.title, + icon: "smiley", + category: "wpblock-blocks", + parent: ["wpblocks-multiple/nested-parent"], + supports: metadata.supports, + attributes: metadata.attributes, + edit: Edit, + save: Save, +}); diff --git a/src/points-cles/nested-children/index_bot.js b/src/points-cles/nested-children/index_bot.js new file mode 100644 index 0000000..d537a9d --- /dev/null +++ b/src/points-cles/nested-children/index_bot.js @@ -0,0 +1,11 @@ +import { registerBlockType } from "@wordpress/blocks"; +import "./style.scss"; + +import Edit from "./edit"; +import save from "./save"; +import metadata from "./block.json"; + +registerBlockType(metadata.name, { + edit: Edit, + save, +}); diff --git a/src/points-cles/nested-children/save.js b/src/points-cles/nested-children/save.js new file mode 100644 index 0000000..9d5accd --- /dev/null +++ b/src/points-cles/nested-children/save.js @@ -0,0 +1,8 @@ +import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; + +export default function save({ attributes }) { + const { userName, userPosition } = attributes; + return ( + + ); +} diff --git a/src/points-cles/nested-children/style.scss b/src/points-cles/nested-children/style.scss new file mode 100644 index 0000000..c085c2b --- /dev/null +++ b/src/points-cles/nested-children/style.scss @@ -0,0 +1,12 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-blocka { + background-color: #21759b; + color: #fff; + padding: 2px; +} diff --git a/src/points-cles/render.php b/src/points-cles/render.php new file mode 100644 index 0000000..bdd71a3 --- /dev/null +++ b/src/points-cles/render.php @@ -0,0 +1,22 @@ +'; +// print_r($block); +// echo ''; + +$inner_blocks_html = ''; +foreach ($block->inner_blocks as $inner_block) { + $inner_blocks_html .= $inner_block->render(); +} +?> +
    +
    +
    + +
    +

    +
    + + + +
    \ No newline at end of file diff --git a/src/points-cles/save.js b/src/points-cles/save.js new file mode 100644 index 0000000..4fc6cfa --- /dev/null +++ b/src/points-cles/save.js @@ -0,0 +1,15 @@ +import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; +import { __ } from "@wordpress/i18n"; +import { useSelect, useDispatch } from "@wordpress/data"; // pour les querry +import { getThematiqueFamilySlug } from "../../utilities.js"; + +export default function save({ attributes, setAttributes }) { + return ( +
    +

    + {__("Les points clés", "homegrade-theme__bloks-texte-fonctionnel")} +

    + +
    + ); +} diff --git a/src/points-cles/style.scss b/src/points-cles/style.scss new file mode 100644 index 0000000..d5fc509 --- /dev/null +++ b/src/points-cles/style.scss @@ -0,0 +1,44 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-homegrade-content-blocks-points-cles { + margin-bottom: 2rem; + &__titling { + display: flex; + align-items: center; + .icon { + background-color: black; + border-radius: 50%; + aspect-ratio: 1/1; + width: 40px; + padding: 10px; + height: fit-content; + + img { + width: 30px; + height: auto; + } + } + h3 { + padding-left: 10px; + } + } + + ul li { + list-style-type: disc; + list-style-position: inside; + // display: flex; + margin-left: 1.5em; + } + + p + ul { + padding-top: 16px; + } + ul + p { + padding-top: 16px; + } +} diff --git a/src/questions-container-auto/block.json b/src/questions-container-auto/block.json new file mode 100644 index 0000000..06a0b46 --- /dev/null +++ b/src/questions-container-auto/block.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "apiVersion": 2, + "name": "homegrade-content-blocks/questions-container-auto", + "version": "0.1.0", + "title": "Bloc Questions Auto", + "category": "homegrade-blocks", + "icon": { + "background": "#fff", + "foreground": "#DF1E1E", + "src": "feedback" + }, + "description": "Pour intégrer le contenu d'une fiche de questions dans une page conseils", + "supports": { + "html": false + }, + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", + "editorScript": "file:./index.js", + "editorStyle": "file:./index.css", + "style": "file:./style-index.css", + "render": "file:./render.php", + "attributes": { + "relatedPostId": { + "type": "number" + }, + "montexte": { + "type": "string", + "default": "truc" + } + } +} \ No newline at end of file diff --git a/src/questions-container-auto/edit.js b/src/questions-container-auto/edit.js new file mode 100644 index 0000000..b6df4c0 --- /dev/null +++ b/src/questions-container-auto/edit.js @@ -0,0 +1,152 @@ +import { __ } from "@wordpress/i18n"; +import { + useBlockProps, + RichText, + BlockControls, + InspectorControls, +} from "@wordpress/block-editor"; +import { + ToolbarGroup, + ToolbarButton, + DropdownMenu, + ToolbarDropdownMenu, + PanelBody, + TextControl, + TextareaControl, + ToggleControl, + SelectControl, +} from "@wordpress/components"; +import { useSelect } from "@wordpress/data"; // pour les querry +import "./editor.scss"; +import apiFetch from "@wordpress/api-fetch"; +import { useEffect, useState, RawHTML } from "@wordpress/element"; +import { Autocomplete } from "@wordpress/components"; + +export default function Edit({ attributes, setAttributes }) { + const { relatedPostId, montexte } = attributes; + // console.log(montexte); + + function handleRelatedPostChange(postId) { + setAttributes({ relatedPostId: Number(postId), montexte: "test" }); + } + + let [taxonomiesOptions, setTaxonomiesOptions] = useState(null); + let postTaxonomies = useSelect((select) => + select("core/editor").getCurrentPostAttribute("thematiques") + ); + let postMainTaxonomy = useSelect( + (select) => + select("core").getEntityRecord( + "taxonomy", + "thematiques", + postTaxonomies[0] + ), + [postTaxonomies] + ); + let postParentTaxonomy = useSelect( + (select) => { + if (postMainTaxonomy) { + return select("core").getEntityRecord( + "taxonomy", + "thematiques", + postMainTaxonomy.parent + ); + } + }, + [postMainTaxonomy] + ); + + let relatedPostsOptions = useSelect( + (select) => { + if (postMainTaxonomy) { + return select("core").getEntityRecords("postType", "fiche-questions", { + per_page: -1, + _embed: true, + thematiques: postMainTaxonomy.id, + }); + } + }, + [postMainTaxonomy] + ); + + let currentRelatedPost = useSelect((select) => { + return select("core").getEntityRecord( + "postType", + "fiche-questions", + relatedPostId + ); + }); + + const { relatedPosts } = useSelect((select) => { + const { getEntityRecords } = select("core"); + let query = {}; + if (postMainTaxonomy) { + // Query args + query = { + status: "publish", + per_page: -1, + thematiques: postMainTaxonomy ? postMainTaxonomy.id : null, + }; + } + + return { + relatedPosts: getEntityRecords("postType", "fiche-questions", query), + }; + }); + // if (relatedPosts) { + // let test = relatedPosts.map(({ item }) =>

    {item.title.rendered}

    ); + // } + let relatedPostsContent; + if (relatedPosts) { + relatedPostsContent = relatedPosts.map((post) => { + return ( + <> +

    {post.title.rendered}

    + {post.content.raw} + + ); + }); + } + + if (!relatedPostsOptions) { + return ( + <> +

    chargement…

    + + ); + } + + console.log(relatedPostId); + + return ( + <> + {relatedPosts && relatedPosts.length > 0 && ( +
    {relatedPostsContent}
    + )} + +
    + {!relatedPostId && ( + <> +

    + {__( + "Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.", + "homegrade-theme__blocks-texte-fonctionnel" + )} +

    + + )} + + {currentRelatedPost && ( + <> +

    {currentRelatedPost.title.rendered}

    + {currentRelatedPost.content.raw} + + )} + {/* {relatedPostsOptions && + relatedPostsOptions.map((post) => { + return
  • {post.title.rendered}
  • ; + })} */} +
    + + ); +} diff --git a/src/questions-container-auto/editor.scss b/src/questions-container-auto/editor.scss new file mode 100644 index 0000000..af39d6e --- /dev/null +++ b/src/questions-container-auto/editor.scss @@ -0,0 +1,9 @@ +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ + +.wp-block-create-block-wpblock-latest-posts { + border: 1px dotted #f00; +} diff --git a/src/questions-container-auto/index.js b/src/questions-container-auto/index.js new file mode 100644 index 0000000..cc4f933 --- /dev/null +++ b/src/questions-container-auto/index.js @@ -0,0 +1,10 @@ +import { registerBlockType } from "@wordpress/blocks"; + +import "./style.scss"; + +import Edit from "./edit"; +import metadata from "./block.json"; + +registerBlockType(metadata.name, { + edit: Edit, +}); diff --git a/src/questions-container-auto/render.php b/src/questions-container-auto/render.php new file mode 100644 index 0000000..02f14d3 --- /dev/null +++ b/src/questions-container-auto/render.php @@ -0,0 +1,27 @@ + 30, + 'post_status' => 'publish', + 'post_type' => 'fiche-questions', + 'thematiques' => $term->ID, +)); +?> + + +
    + + +
    +

    post_title ?>

    +
    post_content ?>
    +
    + + + +
    \ No newline at end of file diff --git a/src/questions-container-auto/save.js b/src/questions-container-auto/save.js new file mode 100644 index 0000000..c95b13a --- /dev/null +++ b/src/questions-container-auto/save.js @@ -0,0 +1,7 @@ +import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor"; + +export default function save({ attributes }) { + const { blocktitle, showDescription } = attributes; + + return

    qsdqsd

    ; +} diff --git a/src/questions-container-auto/style.scss b/src/questions-container-auto/style.scss new file mode 100644 index 0000000..715a545 --- /dev/null +++ b/src/questions-container-auto/style.scss @@ -0,0 +1,16 @@ +/** + * The following styles get applied both on the front of your site + * and in the editor. + * + * Replace them with your own styles or remove the file completely. + */ + +.questions-container-block { + &__question-content { + padding: 10px 0 30px 0; + } + + h2 { + font-weight: 800; + } +} diff --git a/src/questions-container/block.json b/src/questions-container/block.json index e7b284c..b85f313 100644 --- a/src/questions-container/block.json +++ b/src/questions-container/block.json @@ -4,7 +4,7 @@ "name": "homegrade-content-blocks/questions-container", "version": "0.1.0", "title": "Bloc Questions", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": { "background": "#fff", "foreground": "#DF1E1E", @@ -14,9 +14,18 @@ "supports": { "html": false }, - "textdomain": "wpblock-latest-posts", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", - "render": "file:./render.php" + "render": "file:./render.php", + "attributes": { + "relatedPostId": { + "type": "number" + }, + "montexte": { + "type": "string", + "default": "truc" + } + } } \ No newline at end of file diff --git a/src/questions-container/edit.js b/src/questions-container/edit.js index f3804f5..674851f 100644 --- a/src/questions-container/edit.js +++ b/src/questions-container/edit.js @@ -19,82 +19,156 @@ import { import { useSelect } from "@wordpress/data"; // pour les querry import "./editor.scss"; import apiFetch from "@wordpress/api-fetch"; -import { useEffect, useState } from "@wordpress/element"; +import { useEffect, useState, RawHTML } from "@wordpress/element"; import { Autocomplete } from "@wordpress/components"; export default function Edit({ attributes, setAttributes }) { - const autocompleters = [ - { - name: "fruit", - // The prefix that triggers this completer - triggerPrefix: "~", - // The option data - options: [ - { visual: "🍎", name: "Apple", id: 1 }, - { visual: "🍊", name: "Orange", id: 2 }, - { visual: "🍇", name: "Grapes", id: 3 }, - ], - // Returns a label for an option like "🍊 Orange" - getOptionLabel: (option) => ( - - {option.visual} - {option.name} - - ), - // Declares that options should be matched by their name - getOptionKeywords: (option) => [option.name], - // Declares that the Grapes option is disabled - isOptionDisabled: (option) => option.name === "Grapes", - // Declares completions should be inserted as abbreviations - getOptionCompletion: (option) => ( - {option.visual} - ), - }, - ]; + const { relatedPostId, montexte } = attributes; + // console.log(montexte); + + function handleRelatedPostChange(postId) { + setAttributes({ relatedPostId: Number(postId), montexte: "test" }); + // console.log(typeof relatedPostId); + // console.log(relatedPostId); + // console.log(montexte); + } let [taxonomiesOptions, setTaxonomiesOptions] = useState(null); + let postTaxonomies = useSelect((select) => + select("core/editor").getCurrentPostAttribute("thematiques") + ); + let postMainTaxonomy = useSelect( + (select) => + select("core").getEntityRecord( + "taxonomy", + "thematiques", + postTaxonomies[0] + ), + [postTaxonomies] + ); + let postParentTaxonomy = useSelect( + (select) => { + if (postMainTaxonomy) { + return select("core").getEntityRecord( + "taxonomy", + "thematiques", + postMainTaxonomy.parent + ); + } + }, + [postMainTaxonomy] + ); + let currentGeneralThematique = postParentTaxonomy ?? postMainTaxonomy ?? null; - let relatedPosts = useSelect((select) => - select("core").getEntityRecords("postType", "fiche-questions", { - per_page: -1, - thematiques: 35, - }) + let relatedPostsOptions = useSelect( + (select) => { + if (postMainTaxonomy) { + return select("core").getEntityRecords("postType", "fiche-questions", { + per_page: -1, + _embed: true, + thematiques: postMainTaxonomy.id, + }); + } + }, + [postMainTaxonomy] ); - // function getDatas() { - // // Liste des questions sur la thématique courante + let currentRelatedPost = useSelect((select) => { + return select("core").getEntityRecord( + "postType", + "fiche-questions", + relatedPostId + ); + }); - // apiFetch({ path: "/wp/v2/thematiques?per_page=-1" }).then((terms) => { - // let notEmptyTaxs = terms.filter((term) => term.count > 0); + const { pages } = useSelect((select) => { + const { getEntityRecords } = select("core"); + let query = {}; + if (postMainTaxonomy) { + // Query args + query = { + status: "publish", + per_page: -1, + thematiques: postMainTaxonomy ? postMainTaxonomy.id : null, + }; + } - // setTaxonomiesOptions(notEmptyTaxs); - // }); - // } + return { + pages: getEntityRecords("postType", "fiche-questions", query), + }; + }); - useEffect(() => { - // getDatas(); - }, []); - - if (relatedPosts) { - console.log(relatedPosts); + // populate options for + let options = []; + if (pages) { + options.push({ value: 0, label: "Select a page" }); + pages.forEach((page) => { + options.push({ value: page.id, label: page.title.rendered }); + }); + } else { + options.push({ value: 0, label: "Loading..." }); } + if (postMainTaxonomy) { + // console.log(postMainTaxonomy.id); + } + if (relatedPostsOptions) { + // console.log(relatedPostsOptions); + } + + if (!relatedPostsOptions) { + return ( + <> +

    chargement…

    + + ); + } + + console.log(relatedPostId); + return ( <> - - {({ isExpanded, listBoxId, activeId }) => ( -
    + + + handleRelatedPostChange(e)} + /> + + +
    + {!relatedPostId && ( + <> +

    + {__( + "Ce bloc n'est relié à aucune question. Rattachez-le à une fiche question dans la barre latérale.", + "homegrade-theme__blocks-texte-fonctionnel" + )} +

    + )} - -

    Type ~ for triggering the autocomplete.

    -

    test

    + + {currentRelatedPost && ( + <> +

    {currentRelatedPost.title.rendered}

    + {currentRelatedPost.content.raw} + + )} + {/* {relatedPostsOptions && + relatedPostsOptions.map((post) => { + return
  • {post.title.rendered}
  • ; + })} */} +
    ); } diff --git a/src/questions-container/render.php b/src/questions-container/render.php index 038d573..f5f3a92 100644 --- a/src/questions-container/render.php +++ b/src/questions-container/render.php @@ -1,9 +1,18 @@ '; +// print_r($relatedPostID); +// print_r($relatedPost); +echo ''; + ?> -
    - yo +
    +

    post_title ?>

    + post_content ?>
    \ No newline at end of file diff --git a/src/questions-container/style.scss b/src/questions-container/style.scss index 787a499..e231603 100644 --- a/src/questions-container/style.scss +++ b/src/questions-container/style.scss @@ -5,8 +5,8 @@ * Replace them with your own styles or remove the file completely. */ -.wp-block-create-block-wpblock-latest-posts { - background-color: #21759b; - color: #fff; - padding: 2px; +.questions-container-block { + h2 { + font-weight: 800; + } } diff --git a/src/wpblock-citation/block.json b/src/wpblock-citation/block.json index 2ecaf3b..c7e086f 100644 --- a/src/wpblock-citation/block.json +++ b/src/wpblock-citation/block.json @@ -4,13 +4,13 @@ "name": "create-block/wpblock-citation", "version": "0.1.0", "title": "Wpblock Citation", - "category": "wpblock-blocks", + "category": "homegrade-blocks", "icon": "smiley", "description": "WPBlock de citation", "supports": { "html": false }, - "textdomain": "wpblock-citation", + "textdomain": "homegrade-theme__bloks-texte-fonctionnel", "editorScript": "file:./index.js", "editorStyle": "file:./index.css", "style": "file:./style-index.css", diff --git a/src/wpblock-citation/edit.js b/src/wpblock-citation/edit.js index b3e5836..5405279 100644 --- a/src/wpblock-citation/edit.js +++ b/src/wpblock-citation/edit.js @@ -38,7 +38,7 @@ export default function Edit({ attributes, setAttributes }) { setAttributes({ textAlignment: newAlignment }); } - console.log(citation); + // console.log(citation); return (
    template_lock = 'insert'; + // $post_type_object->template = array( + // array('core/paragraph', array( + // 'placeholder' => 'Add Description...', + // )), + // ); +} +// add_action('init', 'homegrade_content_blocks_register_template'); + +function filter_block_editor_settings_when_post_provided($editor_settings, $editor_context) +{ + // echo '
    ';
    +	// print_r($editor_settings);
    +	// echo '
    '; + return $editor_settings; +} + +// add_filter('block_editor_settings_all', 'filter_block_editor_settings_when_post_provided', 10, 2);