\n\t\t\t\t{__(\n\t\t\t\t\t\"Les éléments encodés dans la section jobs 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),\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[\"React\"];","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","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\"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, 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\"] = globalThis[\"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","id","xmlns","viewBox","class","d","foreground","edit","attributes","Content"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAqC;AACmB;AACF;AAC/B;AAER,SAASG,IAA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A;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC7BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEnDA;UACA;UACA;UACA;UACA","sources":["webpack://test/./src/edit.js","webpack://test/./src/index.js","webpack://test/./src/save.js","webpack://test/./src/editor.scss?0774","webpack://test/./src/style.scss?03c3","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 encodés dans la section jobs 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),\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","id","xmlns","viewBox","class","d","foreground","edit","attributes","Content"],"sourceRoot":""}
\ No newline at end of file
diff --git a/blocks/offres-emplois/build/render.php b/blocks/offres-emplois/build/render.php
index 9b41c71..1b60cc2 100644
--- a/blocks/offres-emplois/build/render.php
+++ b/blocks/offres-emplois/build/render.php
@@ -14,9 +14,13 @@ if (!function_exists("translateContractType")) {
function translateContractType($contractType)
{
+ write_log($contractType);
switch ($contractType) {
- case 'CDI, temps plein':
- return __("CDI, temps plein", "homegrade-theme__texte-fonctionnel");
+ case 'Mi-temps':
+ return __("Mi-temps", "homegrade-theme__texte-fonctionnel");
+ break;
+ case 'CDI, 4/5e':
+ return __("CDI, 4/5e", "homegrade-theme__texte-fonctionnel");
break;
case 'CDI, 4/5e':
return __("CDI, 4/5e", "homegrade-theme__texte-fonctionnel");
@@ -24,8 +28,6 @@ if (!function_exists("translateContractType")) {
}
}
}
-
-
?>
"homegrade-blocks-offres-emplois"]); ?>>
@@ -43,6 +45,7 @@ if (!function_exists("translateContractType")) {
posts as $offre) : ?>
ID) ? get_field("contract_type", $offre->ID)['label'] : null;
+ echo $contractType;
$offrePermalink = get_the_permalink($offre->ID);
get_the_content($offre->ID);
@@ -54,9 +57,7 @@ if (!function_exists("translateContractType")) {
-
-
\ No newline at end of file
diff --git a/blocks/offres-emplois/build/style-index.css b/blocks/offres-emplois/build/style-index.css
index 5960a04..a928900 100644
--- a/blocks/offres-emplois/build/style-index.css
+++ b/blocks/offres-emplois/build/style-index.css
@@ -1,6 +1,6 @@
-/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** css ./node_modules/.pnpm/css-loader@6.10.0_webpack@5.90.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.4.35_webpack@5.90.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@12.6.0_sass@1.71.1_webpack@5.90.3/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/offres-emplois/src/render.php b/blocks/offres-emplois/src/render.php
index 9b41c71..1b60cc2 100644
--- a/blocks/offres-emplois/src/render.php
+++ b/blocks/offres-emplois/src/render.php
@@ -14,9 +14,13 @@ if (!function_exists("translateContractType")) {
function translateContractType($contractType)
{
+ write_log($contractType);
switch ($contractType) {
- case 'CDI, temps plein':
- return __("CDI, temps plein", "homegrade-theme__texte-fonctionnel");
+ case 'Mi-temps':
+ return __("Mi-temps", "homegrade-theme__texte-fonctionnel");
+ break;
+ case 'CDI, 4/5e':
+ return __("CDI, 4/5e", "homegrade-theme__texte-fonctionnel");
break;
case 'CDI, 4/5e':
return __("CDI, 4/5e", "homegrade-theme__texte-fonctionnel");
@@ -24,8 +28,6 @@ if (!function_exists("translateContractType")) {
}
}
}
-
-
?>
"homegrade-blocks-offres-emplois"]); ?>>
@@ -43,6 +45,7 @@ if (!function_exists("translateContractType")) {
posts as $offre) : ?>
ID) ? get_field("contract_type", $offre->ID)['label'] : null;
+ echo $contractType;
$offrePermalink = get_the_permalink($offre->ID);
get_the_content($offre->ID);
@@ -54,9 +57,7 @@ if (!function_exists("translateContractType")) {
-
-
\ No newline at end of file
diff --git a/build/index.asset.php b/build/index.asset.php
index 738eb37..71dcc6f 100644
--- a/build/index.asset.php
+++ b/build/index.asset.php
@@ -1 +1 @@
- array('wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => '10f43e16ebf389dccac0');
+ array('wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => '692a2c6f0430adbf174a');
diff --git a/build/index.js b/build/index.js
index 74e56c1..0bdc967 100644
--- a/build/index.js
+++ b/build/index.js
@@ -51,7 +51,7 @@ function getThematiqueFamilySlug(thematique_slug) {
case "urbanisme":
return "energies-urbanisme";
case "acoustique":
- case "petites-coproprietes":
+ case "coproprietes":
return "acoustique-coproprietes";
case "isolation":
case "au-quotidien":
diff --git a/build/index.js.map b/build/index.js.map
index 9336579..fe616eb 100644
--- a/build/index.js.map
+++ b/build/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;AAAmD;;AAEnD;AACA;AACA;AACkD;AAClD,cAAc,iEAAa,CAAC,sDAAG;AAC/B;AACA;AACA,CAAC,EAAE,iEAAa,CAAC,uDAAI;AACrB;AACA,CAAC;AACD,iEAAe,KAAK,EAAC;AACrB;;;;;;;;;;;;;;;;ACbO,SAASA,uBAAuBA,CAACC,eAAe,EAAE;EACxD,QAAQA,eAAe;IACtB,KAAK,SAAS;IACd,KAAK,WAAW;MACf,OAAO,oBAAoB;IAE5B,KAAK,YAAY;IACjB,KAAK,sBAAsB;MAC1B,OAAO,yBAAyB;IAEjC,KAAK,WAAW;IAChB,KAAK,cAAc;MAClB,OAAO,qBAAqB;IAE7B,KAAK,UAAU;IACf,KAAK,WAAW;MACf,OAAO,oBAAoB;IAE5B,KAAK,YAAY;IACjB,KAAK,mBAAmB;MACvB,OAAO,2BAA2B;IAEnC,KAAK,UAAU;MACd,OAAO,UAAU;EACnB;AACD;AAEO,SAASC,WAAWA,CAACC,MAAM,EAAE;EACnC,OAAOA,MAAM,CACXC,SAAS,CAAC,KAAK,CAAC,CAChBC,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,CAAC,SAAS,EAAE,kBAAkB,CAAC;EACxCwD,OAAO,EAAE,QAAQ;EACjBzB,UAAU,EAAE;IACXgC,YAAY,EAAE,oBAAoB;IAClCG,qBAAqB,EAAE,yBAAyB;IAChDF,eAAe,EAAE;EAClB,CAAC;EACDf,SAAS,EAAE,cAAc;EACzBS,IAAI,EAAEC;AACP,CAAC,CAAC;;;;;;;;;;;ACpJF;;;;;;;;;;;;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;;;;;WCtBA;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;;;;;;;;;;;;;;;;ACN4C;AACD;AAEX;AACc;AACD;;AAE7C;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,W","sources":["webpack://multi-blocks/./node_modules/@wordpress/icons/build-module/library/trash.js","webpack://multi-blocks/./blocks/utilities.js","webpack://multi-blocks/./src/format-types/brochure/brochure.js","webpack://multi-blocks/./src/format-types/tooltip/tooltip.js","webpack://multi-blocks/./src/format-types/brochure/brochure.css?c994","webpack://multi-blocks/./src/format-types/tooltip/tooltip.css?0248","webpack://multi-blocks/external window [\"wp\",\"blockEditor\"]","webpack://multi-blocks/external window [\"wp\",\"components\"]","webpack://multi-blocks/external window [\"wp\",\"data\"]","webpack://multi-blocks/external window [\"wp\",\"element\"]","webpack://multi-blocks/external window [\"wp\",\"i18n\"]","webpack://multi-blocks/external window [\"wp\",\"primitives\"]","webpack://multi-blocks/external window [\"wp\",\"richText\"]","webpack://multi-blocks/webpack/bootstrap","webpack://multi-blocks/webpack/runtime/compat get default export","webpack://multi-blocks/webpack/runtime/define property getters","webpack://multi-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://multi-blocks/webpack/runtime/make namespace object","webpack://multi-blocks/./src/index.js"],"sourcesContent":["import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst trash = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z\"\n}));\nexport default trash;\n//# sourceMappingURL=trash.js.map","export 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 \"sante-et-securite\":\r\n\t\t\treturn \"patrimoine-sante-securite\";\r\n\r\n\t\tcase \"location\":\r\n\t\t\treturn \"location\";\r\n\t}\r\n}\r\n\r\nexport function cleanString(string) {\r\n\treturn string\r\n\t\t.normalize(\"NFD\")\r\n\t\t.replace(/[\\u0300-\\u036f]/g, \"\")\r\n\t\t.toLowerCase()\r\n\t\t.split(\" \")\r\n\t\t.join(\"-\");\r\n}\r\n\r\nexport function getAdminLanguageFromCookie(c_name) {\r\n\tvar c_value = document.cookie,\r\n\t\tc_start = c_value.indexOf(\" \" + c_name + \"=\");\r\n\tif (c_start == -1) c_start = c_value.indexOf(c_name + \"=\");\r\n\tif (c_start == -1) {\r\n\t\tc_value = null;\r\n\t} else {\r\n\t\tc_start = c_value.indexOf(\"=\", c_start) + 1;\r\n\t\tvar c_end = c_value.indexOf(\";\", c_start);\r\n\t\tif (c_end == -1) {\r\n\t\t\tc_end = c_value.length;\r\n\t\t}\r\n\t\tc_value = unescape(c_value.substring(c_start, c_end));\r\n\t}\r\n\treturn c_value;\r\n}\r\n","import { registerFormatType, toggleFormat, applyFormat, getActiveFormats } from \"@wordpress/rich-text\";\r\nimport { __ } from \"@wordpress/i18n\";\r\nimport { BlockControls, __experimentalLinkControl as LinkControl } from \"@wordpress/block-editor\";\r\nimport { Popover, Button } from \"@wordpress/components\";\r\n\r\nimport { ToolbarGroup, ToolbarButton, TextareaControl } from \"@wordpress/components\";\r\nimport { check, trash } from \"@wordpress/icons\";\r\n\r\nimport { useState } from \"@wordpress/element\";\r\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\r\n\r\nconst formatName = \"homegrade-format/brochure-format\";\r\n\r\nconst BrochureLinkFormatButton = (props) => {\r\n\tconst { isActive, value, onChange } = props;\r\n\tconst [isPopoverOpen, setIsPopoverOpen] = useState(false);\r\n\tconst [relatedPost, setRelatedPost] = useState(\"\");\r\n\tconst [pendingBrochure, setPendingBrochure] = useState(false);\r\n\r\n\tconst activeFormat = getActiveFormats(value).filter((format) => format.type === formatName)[0];\r\n\r\n\tconst brochurePost = useSelect((select) => {\r\n\t\tif (activeFormat && activeFormat.attributes.brochurePostID) {\r\n\t\t\treturn select(\"core\").getEntityRecord(\r\n\t\t\t\t\"postType\",\r\n\t\t\t\t\"brochures\",\r\n\t\t\t\tactiveFormat.attributes.brochurePostID\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tconst brochureAttachedMedia = useSelect((select) => {\r\n\t\tif (brochurePost && brochurePost.acf && brochurePost.acf.brochure_pdf) {\r\n\t\t\treturn select(\"core\").getEntityRecord(\"postType\", \"attachment\", brochurePost.acf.brochure_pdf);\r\n\t\t}\r\n\t});\r\n\r\n\tfunction setFormat(postDatas) {\r\n\t\tsetIsPopoverOpen(!isPopoverOpen);\r\n\t\tsetPendingBrochure(true);\r\n\t\tonChange(\r\n\t\t\tapplyFormat(value, {\r\n\t\t\t\ttype: formatName,\r\n\t\t\t\tattributes: {\r\n\t\t\t\t\thref: postDatas.url,\r\n\t\t\t\t\tbrochurePostID: postDatas.id.toString(),\r\n\t\t\t\t\ttarget: \"_blank\",\r\n\t\t\t\t\tstyle: \"text-decoration: underline;\",\r\n\t\t\t\t},\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tfunction removeFormat() {\r\n\t\tsetIsPopoverOpen(false);\r\n\t\tonChange(\r\n\t\t\ttoggleFormat(value, {\r\n\t\t\t\ttype: formatName,\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\t// if (brochurePost && brochureAttachedMedia && pendingBrochure) {\r\n\t// \tonChange(\r\n\t// \t\tapplyFormat(value, {\r\n\t// \t\t\ttype: formatName,\r\n\t// \t\t\tattributes: {\r\n\t// \t\t\t\ttarget: \"_blank\",\r\n\t// \t\t\t\tbrochurePostID: brochurePost.id.toString(),\r\n\t// \t\t\t\tbrochureID: brochureAttachedMedia.id.toString(),\r\n\t// \t\t\t\thref: brochurePost.link,\r\n\t// \t\t\t\tstyle: \"text-decoration: underline;\",\r\n\t// \t\t\t},\r\n\t// \t\t})\r\n\t// \t);\r\n\t// \tsetPendingBrochure(false);\r\n\t// }\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{isPopoverOpen && (\r\n\t\t\t\t\t setIsPopoverOpen(false)}\r\n\t\t\t\t\t\tclassName='popover_tooltip_field'>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t!isActive ? setIsPopoverOpen(!isPopoverOpen) : removeFormat()\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t>\r\n\t);\r\n};\r\n\r\nregisterFormatType(\"homegrade-format/brochure-format\", {\r\n\ttitle: \"Lien Brochure/Fiche-info\",\r\n\ttagName: \"a\",\r\n\tattributes: {\r\n\t\tbrochureID: \"brochure-id\",\r\n\t\tbrochurePostID: \"brochure-post-id\",\r\n\t},\r\n\tclassName: \"brochure-link-format\",\r\n\tedit: BrochureLinkFormatButton,\r\n});\r\n","import { __ } from \"@wordpress/i18n\";\r\nimport { registerFormatType, toggleFormat, applyFormat, getActiveFormats } from \"@wordpress/rich-text\";\r\n\r\nimport { BlockControls, __experimentalLinkControl as LinkControl } from \"@wordpress/block-editor\";\r\nimport { Popover, ToolbarGroup, ToolbarButton } from \"@wordpress/components\";\r\nimport { trash } from \"@wordpress/icons\";\r\nimport { useState } from \"@wordpress/element\";\r\nimport { useSelect } from \"@wordpress/data\"; // pour les querry\r\n\r\nconst formatName = \"homegrade-format/tooltip\";\r\n\r\nconst Edit = (props) => {\r\n\tconst { isActive, value, onChange } = props;\r\n\tconst [isPopoverOpen, setIsPopoverOpen] = useState(false);\r\n\tconst [pendingDefinition, setPendingDefinition] = useState(false);\r\n\r\n\tconst activeFormat = getActiveFormats(value).filter((format) => format.type === formatName)[0];\r\n\tconst lang = getAdminLanguageFromCookie(\"wp-wpml_current_language\");\r\n\r\n\tfunction getAdminLanguageFromCookie(c_name) {\r\n\t\tvar c_value = document.cookie,\r\n\t\t\tc_start = c_value.indexOf(\" \" + c_name + \"=\");\r\n\t\tif (c_start == -1) c_start = c_value.indexOf(c_name + \"=\");\r\n\t\tif (c_start == -1) {\r\n\t\t\tc_value = null;\r\n\t\t} else {\r\n\t\t\tc_start = c_value.indexOf(\"=\", c_start) + 1;\r\n\t\t\tvar c_end = c_value.indexOf(\";\", c_start);\r\n\t\t\tif (c_end == -1) {\r\n\t\t\t\tc_end = c_value.length;\r\n\t\t\t}\r\n\t\t\tc_value = unescape(c_value.substring(c_start, c_end));\r\n\t\t}\r\n\t\treturn c_value;\r\n\t}\r\n\tfunction removeFormat() {\r\n\t\tsetIsPopoverOpen(false);\r\n\t\tonChange(\r\n\t\t\ttoggleFormat(value, {\r\n\t\t\t\ttype: formatName,\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\tfunction setFormat(postDatas) {\r\n\t\tsetPendingDefinition(true);\r\n\t\tsetIsPopoverOpen(false);\r\n\r\n\t\tonChange(\r\n\t\t\tapplyFormat(value, {\r\n\t\t\t\ttype: formatName,\r\n\t\t\t\tattributes: {\r\n\t\t\t\t\tdefinitionId: postDatas.id.toString(),\r\n\t\t\t\t\tdataTooltipWord: postDatas.title,\r\n\t\t\t\t},\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\r\n\tconst post = useSelect((select) => {\r\n\t\tif (activeFormat && activeFormat.attributes.definitionId) {\r\n\t\t\treturn select(\"core\").getEntityRecord(\r\n\t\t\t\t\"postType\",\r\n\t\t\t\t\"vocabulaire\",\r\n\t\t\t\tactiveFormat.attributes.definitionId\r\n\t\t\t);\r\n\t\t}\r\n\t});\r\n\r\n\tif (post && pendingDefinition) {\r\n\t\tonChange(\r\n\t\t\tapplyFormat(value, {\r\n\t\t\t\ttype: formatName,\r\n\t\t\t\tattributes: {\r\n\t\t\t\t\tdataTooltipDefinition: post.acf.definition,\r\n\t\t\t\t\tdefinitionId: activeFormat.attributes.definitionId,\r\n\t\t\t\t\tdataTooltipWord: activeFormat.attributes.dataTooltipWord,\r\n\t\t\t\t},\r\n\t\t\t})\r\n\t\t);\r\n\t\tsetPendingDefinition(false);\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t{isPopoverOpen && (\r\n\t\t\t\t\t setIsPopoverOpen(false)}\r\n\t\t\t\t\t\tclassName='popover_tooltip_field'>\r\n\t\t\t\t\t\t setFormat(postDatas)}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\r\n\t\t\t\t)}\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t\tsetIsPopoverOpen(true);\r\n\t\t\t\t\t\t}}\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t{isActive && (\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\tremoveFormat();\r\n\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t)}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t>\r\n\t);\r\n};\r\n\r\nregisterFormatType(formatName, {\r\n\ttitle: __(\"Tooltip\", \"homegrade-format\"),\r\n\ttagName: \"button\",\r\n\tattributes: {\r\n\t\tdefinitionId: \"data-definition-id\",\r\n\t\tdataTooltipDefinition: \"data-tooltip-definition\",\r\n\t\tdataTooltipWord: \"data-tooltip-word\",\r\n\t},\r\n\tclassName: \"tooltip-word\",\r\n\tedit: Edit,\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\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"primitives\"];","module.exports = window[\"wp\"][\"richText\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import \"./format-types/tooltip/tooltip.css\";\r\nimport \"./format-types/tooltip/tooltip.js\";\r\n\r\nimport \"../blocks/utilities.js\";\r\nimport \"./format-types/brochure/brochure.css\";\r\nimport \"./format-types/brochure/brochure.js\";\r\n\r\n// import React from \"react\";\r\n\r\n// import { useSelect, useDispatch } from \"@wordpress/data\";\r\n\r\n// import { useEffect } from \"@wordpress/element\";\r\n\r\n// export default function index() {\r\n// \tuseEffect(() => {\r\n// \t\talert(\"Hello, World!\");\r\n// \t}, []);\r\n\r\n// \treturn
;\r\n// }\r\n\r\n// index();\r\n"],"names":["getThematiqueFamilySlug","thematique_slug","cleanString","string","normalize","replace","toLowerCase","split","join","getAdminLanguageFromCookie","c_name","c_value","document","cookie","c_start","indexOf","c_end","length","unescape","substring","registerFormatType","toggleFormat","applyFormat","getActiveFormats","__","BlockControls","__experimentalLinkControl","LinkControl","Popover","Button","ToolbarGroup","ToolbarButton","TextareaControl","check","trash","useState","useSelect","formatName","BrochureLinkFormatButton","props","isActive","value","onChange","isPopoverOpen","setIsPopoverOpen","relatedPost","setRelatedPost","pendingBrochure","setPendingBrochure","activeFormat","filter","format","type","brochurePost","select","attributes","brochurePostID","getEntityRecord","brochureAttachedMedia","acf","brochure_pdf","setFormat","postDatas","href","url","id","toString","target","style","removeFormat","createElement","Fragment","onClose","className","suggestionsQuery","subtype","icon","label","onClick","title","tagName","brochureID","edit","Edit","pendingDefinition","setPendingDefinition","lang","definitionId","dataTooltipWord","post","dataTooltipDefinition","definition","link","tile","kind","isCollapsed"],"sourceRoot":""}
\ No newline at end of file