diff --git a/blocks/kit-presse/build/index.asset.php b/blocks/kit-presse/build/index.asset.php index c6db351..e2cd3fe 100644 --- a/blocks/kit-presse/build/index.asset.php +++ b/blocks/kit-presse/build/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '2ecb98f6010eb68b78e2'); + array('wp-block-editor', 'wp-blocks', 'wp-element', 'wp-i18n'), 'version' => '2b391ceb1f168117419f'); diff --git a/blocks/kit-presse/build/index.css b/blocks/kit-presse/build/index.css index f2b5005..b556b0c 100644 --- a/blocks/kit-presse/build/index.css +++ b/blocks/kit-presse/build/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/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/editor.scss ***! + \****************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied inside the editor only. * diff --git a/blocks/kit-presse/build/index.js b/blocks/kit-presse/build/index.js index b80b77f..766f5d1 100644 --- a/blocks/kit-presse/build/index.js +++ b/blocks/kit-presse/build/index.js @@ -1,4 +1,4 @@ -/******/ (() => { // webpackBootstrap +/******/ (function() { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ @@ -6,11 +6,11 @@ /*!*********************!*\ !*** ./src/edit.js ***! \*********************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ (function(__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 */ "default": function() { return /* 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__); @@ -27,15 +27,17 @@ __webpack_require__.r(__webpack_exports__); function Edit() { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("section", { ...(0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)({ - className: `homegrade-blocks-starter` + className: `homegrade-blocks-kit-presse` }) }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InnerBlocks, { - allowedBlocks: ["homegrade-content-blocks/section-titling"], + allowedBlocks: ["homegrade-content-blocks/section-titling", "core/paragraph"], template: [["homegrade-content-blocks/section-titling", { sectionTitle: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Kit presse", "homegrade") - }]], + }], ["core/paragraph"]], templateLock: true - })); + }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { + className: "temp_guidance_sentence" + }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Les éléments déposés dans le kit press s'afficheront ici", "homegrade-blocks__text-backoffice"))); } /***/ }), @@ -44,7 +46,7 @@ function Edit() { /*!**********************!*\ !*** ./src/index.js ***! \**********************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ (function(__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"); @@ -84,11 +86,11 @@ __webpack_require__.r(__webpack_exports__); /*!*********************!*\ !*** ./src/save.js ***! \*********************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ (function(__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 */ "default": function() { return /* 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__); @@ -108,7 +110,7 @@ function save({ /*!*************************!*\ !*** ./src/editor.scss ***! \*************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin @@ -120,7 +122,7 @@ __webpack_require__.r(__webpack_exports__); /*!************************!*\ !*** ./src/style.scss ***! \************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin @@ -132,7 +134,7 @@ __webpack_require__.r(__webpack_exports__); /*!*************************************!*\ !*** external ["wp","blockEditor"] ***! \*************************************/ -/***/ ((module) => { +/***/ (function(module) { module.exports = window["wp"]["blockEditor"]; @@ -142,7 +144,7 @@ module.exports = window["wp"]["blockEditor"]; /*!********************************!*\ !*** external ["wp","blocks"] ***! \********************************/ -/***/ ((module) => { +/***/ (function(module) { module.exports = window["wp"]["blocks"]; @@ -152,7 +154,7 @@ module.exports = window["wp"]["blocks"]; /*!*********************************!*\ !*** external ["wp","element"] ***! \*********************************/ -/***/ ((module) => { +/***/ (function(module) { module.exports = window["wp"]["element"]; @@ -162,7 +164,7 @@ module.exports = window["wp"]["element"]; /*!******************************!*\ !*** external ["wp","i18n"] ***! \******************************/ -/***/ ((module) => { +/***/ (function(module) { module.exports = window["wp"]["i18n"]; @@ -172,7 +174,7 @@ module.exports = window["wp"]["i18n"]; /*!************************!*\ !*** ./src/block.json ***! \************************/ -/***/ ((module) => { +/***/ (function(module) { module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"homegrade-content-blocks/kit-presse","version":"0.1.0","title":"Kit Presse","category":"homegrade-blocks","icon":"smiley","description":"Un bloc pour afficher les éléments du kit presse","supports":{"html":false},"textdomain":"test","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","render":"file:./render.php"}'); @@ -209,9 +211,9 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ /************************************************************************/ /******/ /* webpack/runtime/chunk loaded */ -/******/ (() => { +/******/ !function() { /******/ var deferred = []; -/******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { +/******/ __webpack_require__.O = function(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]; @@ -225,7 +227,7 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ var priority = deferred[i][2]; /******/ 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])))) { +/******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) { /******/ chunkIds.splice(j--, 1); /******/ } else { /******/ fulfilled = false; @@ -240,50 +242,50 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ } /******/ return result; /******/ }; -/******/ })(); +/******/ }(); /******/ /******/ /* webpack/runtime/compat get default export */ -/******/ (() => { +/******/ !function() { /******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = (module) => { +/******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); +/******/ function() { return module['default']; } : +/******/ function() { return module; }; /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; -/******/ })(); +/******/ }(); /******/ /******/ /* webpack/runtime/define property getters */ -/******/ (() => { +/******/ !function() { /******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { +/******/ __webpack_require__.d = function(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)) -/******/ })(); +/******/ !function() { +/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } +/******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ -/******/ (() => { +/******/ !function() { /******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { +/******/ __webpack_require__.r = function(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 */ -/******/ (() => { +/******/ !function() { /******/ // no baseURI /******/ /******/ // object to store loaded and loading chunks @@ -304,17 +306,17 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ /******/ // no HMR manifest /******/ -/******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0); +/******/ __webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; }; /******/ /******/ // install a JSONP callback for chunk loading -/******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => { +/******/ var webpackJsonpCallback = function(parentChunkLoadingFunction, data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ var runtime = data[2]; /******/ // 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))) { +/******/ if(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) { /******/ for(moduleId in moreModules) { /******/ if(__webpack_require__.o(moreModules, moduleId)) { /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; @@ -336,14 +338,14 @@ module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json /******/ var chunkLoadingGlobal = self["webpackChunktest"] = self["webpackChunktest"] || []; /******/ 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, ["./style-index"], () => (__webpack_require__("./src/index.js"))) +/******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["./style-index"], function() { return __webpack_require__("./src/index.js"); }) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ /******/ })() diff --git a/blocks/kit-presse/build/index.js.map b/blocks/kit-presse/build/index.js.map index af4f493..8f7b064 100644 --- a/blocks/kit-presse/build/index.js.map +++ b/blocks/kit-presse/build/index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;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEnDA;UACA;UACA;UACA;UACA","sources":["webpack://test/./src/edit.js","webpack://test/./src/index.js","webpack://test/./src/save.js","webpack://test/./src/editor.scss","webpack://test/./src/style.scss","webpack://test/external window [\"wp\",\"blockEditor\"]","webpack://test/external window [\"wp\",\"blocks\"]","webpack://test/external window [\"wp\",\"element\"]","webpack://test/external window [\"wp\",\"i18n\"]","webpack://test/webpack/bootstrap","webpack://test/webpack/runtime/chunk loaded","webpack://test/webpack/runtime/compat get default export","webpack://test/webpack/runtime/define property getters","webpack://test/webpack/runtime/hasOwnProperty shorthand","webpack://test/webpack/runtime/make namespace object","webpack://test/webpack/runtime/jsonp chunk loading","webpack://test/webpack/before-startup","webpack://test/webpack/startup","webpack://test/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { useBlockProps } from \"@wordpress/block-editor\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\n\nexport default function Edit() {\n\treturn (\n\t\t\n\t\t\t\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport Edit from \"./edit\";\nimport save from \"./save\";\n\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: \"#DF1E1E\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, InnerBlocks } from \"@wordpress/block-editor\";\r\n\r\nexport default function save({ attributes }) {\r\n\treturn ;\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\"][\"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 = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunktest\"] = self[\"webpackChunktest\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","Edit","createElement","className","allowedBlocks","template","sectionTitle","templateLock","registerBlockType","save","metadata","name","icon","src","viewBox","id","class","d","foreground","edit","attributes","Content"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;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ACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA;WACA;WACA,kBAAkB,qBAAqB;WACvC,oHAAoH,iDAAiD;WACrK;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,8CAA8C;;WAE9C;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,iCAAiC,mCAAmC;WACpE;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEnDA;UACA;UACA;UACA,2FAA2F,+CAA+C;UAC1I","sources":["webpack://test/./src/edit.js","webpack://test/./src/index.js","webpack://test/./src/save.js","webpack://test/./src/editor.scss?0339","webpack://test/./src/style.scss?75bd","webpack://test/external window [\"wp\",\"blockEditor\"]","webpack://test/external window [\"wp\",\"blocks\"]","webpack://test/external window [\"wp\",\"element\"]","webpack://test/external window [\"wp\",\"i18n\"]","webpack://test/webpack/bootstrap","webpack://test/webpack/runtime/chunk loaded","webpack://test/webpack/runtime/compat get default export","webpack://test/webpack/runtime/define property getters","webpack://test/webpack/runtime/hasOwnProperty shorthand","webpack://test/webpack/runtime/make namespace object","webpack://test/webpack/runtime/jsonp chunk loading","webpack://test/webpack/before-startup","webpack://test/webpack/startup","webpack://test/webpack/after-startup"],"sourcesContent":["import { __ } from \"@wordpress/i18n\";\nimport { useBlockProps } from \"@wordpress/block-editor\";\nimport { InnerBlocks } from \"@wordpress/block-editor\";\nimport \"./editor.scss\";\n\nexport default function Edit() {\n\treturn (\n\t\t\n\t\t\t\n\t\t\t

\n\t\t\t\t{__(\n\t\t\t\t\t\"Les éléments déposés dans le kit press s'afficheront ici\",\n\t\t\t\t\t\"homegrade-blocks__text-backoffice\"\n\t\t\t\t)}\n\t\t\t

\n\t\t\n\t);\n}\n","import { registerBlockType } from \"@wordpress/blocks\";\nimport \"./style.scss\";\nimport Edit from \"./edit\";\nimport save from \"./save\";\n\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: \"#DF1E1E\",\n\t},\n\tedit: Edit,\n\tsave,\n});\n","import { useBlockProps, InnerBlocks } from \"@wordpress/block-editor\";\r\n\r\nexport default function save({ attributes }) {\r\n\treturn ;\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\"][\"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 = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __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 = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunktest\"] = self[\"webpackChunktest\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], function() { return __webpack_require__(\"./src/index.js\"); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InnerBlocks","Edit","createElement","className","allowedBlocks","template","sectionTitle","templateLock","registerBlockType","save","metadata","name","icon","src","viewBox","id","class","d","foreground","edit","attributes","Content"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/kit-presse/build/render.php b/blocks/kit-presse/build/render.php index 4d48269..b860f6a 100644 --- a/blocks/kit-presse/build/render.php +++ b/blocks/kit-presse/build/render.php @@ -2,13 +2,61 @@ $press_kit_datas = get_field('press_kit_datas', 'option'); +if (!function_exists('getRessourceIcon')) { + function getRessourceIcon($ressource_type) + { + switch ($ressource_type) { + case 'image/jpeg': + return plugin_dir_url(__DIR__) . "src/img/homegrade_image.svg"; + case 'application/pdf': + return plugin_dir_url(__DIR__) . "src/img/homegrade_fiches.svg"; + + default: + return plugin_dir_url(__DIR__) . "src/img/homegrade_fiches.svg"; + } + } +} ?> -
> +
"homegrade-blocks-kit-presse"]); ?>> - -

- + +
    + +
    +

    +

    +

    +
    + + '; + // print_r($data); + // echo ''; + ?> +
  • +
    + +
    +

    +

    +

    + + +
  • + + + + + +
\ No newline at end of file diff --git a/blocks/kit-presse/build/style-index.css b/blocks/kit-presse/build/style-index.css index a928900..2230b8b 100644 --- a/blocks/kit-presse/build/style-index.css +++ b/blocks/kit-presse/build/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/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/style.scss ***! + \***************************************************************************************************************************************************************************************************************************************/ /** * The following styles get applied both on the front of your site * and in the editor. diff --git a/blocks/kit-presse/src/edit.js b/blocks/kit-presse/src/edit.js index 80f3cd5..d9d4b30 100644 --- a/blocks/kit-presse/src/edit.js +++ b/blocks/kit-presse/src/edit.js @@ -7,19 +7,29 @@ export default function Edit() { return (
+

+ {__( + "Les éléments déposés dans le kit press s'afficheront ici", + "homegrade-blocks__text-backoffice" + )} +

); } diff --git a/blocks/kit-presse/src/img/homegrade_fiches.svg b/blocks/kit-presse/src/img/homegrade_fiches.svg new file mode 100644 index 0000000..e16588e --- /dev/null +++ b/blocks/kit-presse/src/img/homegrade_fiches.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blocks/kit-presse/src/img/homegrade_image.svg b/blocks/kit-presse/src/img/homegrade_image.svg new file mode 100644 index 0000000..36419aa --- /dev/null +++ b/blocks/kit-presse/src/img/homegrade_image.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blocks/kit-presse/src/render.php b/blocks/kit-presse/src/render.php index 4d48269..b860f6a 100644 --- a/blocks/kit-presse/src/render.php +++ b/blocks/kit-presse/src/render.php @@ -2,13 +2,61 @@ $press_kit_datas = get_field('press_kit_datas', 'option'); +if (!function_exists('getRessourceIcon')) { + function getRessourceIcon($ressource_type) + { + switch ($ressource_type) { + case 'image/jpeg': + return plugin_dir_url(__DIR__) . "src/img/homegrade_image.svg"; + case 'application/pdf': + return plugin_dir_url(__DIR__) . "src/img/homegrade_fiches.svg"; + + default: + return plugin_dir_url(__DIR__) . "src/img/homegrade_fiches.svg"; + } + } +} ?> -
> +
"homegrade-blocks-kit-presse"]); ?>> - -

- + +
    + +
    +

    +

    +

    +
    + + '; + // print_r($data); + // echo ''; + ?> +
  • +
    + +
    +

    +

    +

    + + +
  • + + + + + +
\ No newline at end of file