diff --git a/build/index.asset.php b/build/index.asset.php index 7db1033..72bd20a 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' => '0cf4273f82f41f81d701'); + array('wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-rich-text'), 'version' => '1dd4bad8f85ef781800d'); diff --git a/build/index.css b/build/index.css index a15f464..da19ebe 100644 --- a/build/index.css +++ b/build/index.css @@ -71,6 +71,18 @@ } } +/*!**************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/format-types/boule/boule.css ***! + \**************************************************************************************************************************************************************************************/ +.boule { + display: inline-block !important; + width: 30px !important; + height: 30px !important; + border-radius: 50% !important; + break-word: break-all !important; + text-align: center !important; +} + /*!********************************************************************************************************************************************************************************************!*\ !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./src/format-types/brochure/brochure.css ***! \********************************************************************************************************************************************************************************************/ diff --git a/build/index.css.map b/build/index.css.map index 84df0b8..46017eb 100644 --- a/build/index.css.map +++ b/build/index.css.map @@ -1 +1 @@ -{"version":3,"file":"index.css","mappings":";;;AAAA;CACC,uBAAuB;CACvB,kBAAkB;CAClB,eAAe;CACf,0BAA0B;CAC1B,6BAA6B;CAC7B,0BAA0B;AAC3B;;AAEA;CACC,kBAAkB;CAClB,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,SAAS;CACT,sCAAsC;CACtC,iCAAiC;CACjC,gBAAgB;CAChB,aAAa;CACb,gBAAgB;CAChB,uBAAkB;CAAlB,kBAAkB;CAClB,yBAAyB;AAC1B;AACA;CACC,aAAa;AACd;;AAEA;;CAEC;EACC,cAAc;CACf;AACD;;AAEA;CACC,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,kBAAkB;CAClB,SAAS;CACT,eAAe;CACf,+BAA+B;CAC/B,WAAW;CACX,YAAY;CACZ,8CAA8C;CAC9C,2CAA2C;AAC5C;AACA;CACC,iBAAiB;CACjB,uBAAuB;CACvB,oBAAoB;CACpB,wBAAwB;AACzB;AACA;CACC,uBAAuB;CACvB,oBAAoB;AACrB;;AAEA,mBAAmB;AACnB;CACC;EACC,wBAAwB;EACxB,gBAAgB;CACjB;AACD;;;;;ACnEA;CACC,mBAAmB;CACnB,qBAAqB;CACrB,2BAA2B;AAC5B","sources":["webpack://multi-blocks/./src/format-types/tooltip/tooltip.css","webpack://multi-blocks/./src/format-types/brochure/brochure.css"],"sourcesContent":[".tooltip-word {\r\n\t/* padding-top: 12px; */\r\n\tposition: relative;\r\n\tcursor: default;\r\n\ttext-underline-offset: 4px;\r\n\ttext-decoration-style: dashed;\r\n\ttext-decoration-color: red;\r\n}\r\n\r\n.tooltip-container {\r\n\tposition: relative;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.tooltip-popup {\r\n\tposition: absolute;\r\n\ttop: 0px;\r\n\tleft: 50%;\r\n\t/* transform: translate(-50%, -98%); */\r\n\ttransform: translate(-50%, -100%);\r\n\ttext-align: left;\r\n\tpadding: 10px;\r\n\tmax-width: 300px;\r\n\twidth: max-content;\r\n\t--tooltip-x-position: 50%;\r\n}\r\n.tooltip-popup[aria-hidden=\"true\"] {\r\n\tdisplay: none;\r\n}\r\n\r\n.tooltip-container:hover,\r\n.tooltip-container:focus-visible {\r\n\t.tooltip-popup {\r\n\t\tdisplay: block;\r\n\t}\r\n}\r\n\r\n.tooltip-popup:after {\r\n\tcontent: \"\";\r\n\tdisplay: block;\r\n\tbackground-color: white;\r\n\tposition: absolute;\r\n\ttop: 100%;\r\n\t/* left: 50%; */\r\n\tleft: var(--tooltip-x-position);\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\ttransform: translate(-50%, -50%) rotate(45deg);\r\n\tbox-shadow: 4px 4px 4px rgba(0, 0, 0, 0.08);\r\n}\r\n.tooltip-popup__title {\r\n\tfont-weight: bold;\r\n\tcolor: black !important;\r\n\tpadding-bottom: 10px;\r\n\tmargin-top: 0 !important;\r\n}\r\n.tooltip-popup__definition {\r\n\tcolor: black !important;\r\n\tmargin: 0 !important;\r\n}\r\n\r\n/* FOR THE EDITOR */\r\n.popover_tooltip_field {\r\n\t.components-popover__content {\r\n\t\tpadding: 10px !important;\r\n\t\tmin-width: 200px;\r\n\t}\r\n}\r\n",".brochure-download-icon {\r\n\tmargin: 0 0px 0 6px;\r\n\tdisplay: inline-block;\r\n\ttransform: translateY(-1px);\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.css","mappings":";;;AAAA;CACC,uBAAuB;CACvB,kBAAkB;CAClB,eAAe;CACf,0BAA0B;CAC1B,6BAA6B;CAC7B,0BAA0B;AAC3B;;AAEA;CACC,kBAAkB;CAClB,qBAAqB;AACtB;;AAEA;CACC,kBAAkB;CAClB,QAAQ;CACR,SAAS;CACT,sCAAsC;CACtC,iCAAiC;CACjC,gBAAgB;CAChB,aAAa;CACb,gBAAgB;CAChB,uBAAkB;CAAlB,kBAAkB;CAClB,yBAAyB;AAC1B;AACA;CACC,aAAa;AACd;;AAEA;;CAEC;EACC,cAAc;CACf;AACD;;AAEA;CACC,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,kBAAkB;CAClB,SAAS;CACT,eAAe;CACf,+BAA+B;CAC/B,WAAW;CACX,YAAY;CACZ,8CAA8C;CAC9C,2CAA2C;AAC5C;AACA;CACC,iBAAiB;CACjB,uBAAuB;CACvB,oBAAoB;CACpB,wBAAwB;AACzB;AACA;CACC,uBAAuB;CACvB,oBAAoB;AACrB;;AAEA,mBAAmB;AACnB;CACC;EACC,wBAAwB;EACxB,gBAAgB;CACjB;AACD;;;;;ACnEA;EACE,gCAAgC;EAChC,sBAAsB;EACtB,uBAAuB;EACvB,6BAA6B;EAC7B,gCAAgC;EAChC,6BAA6B;AAC/B;;;;;ACPA;CACC,mBAAmB;CACnB,qBAAqB;CACrB,2BAA2B;AAC5B","sources":["webpack://multi-blocks/./src/format-types/tooltip/tooltip.css","webpack://multi-blocks/./src/format-types/boule/boule.css","webpack://multi-blocks/./src/format-types/brochure/brochure.css"],"sourcesContent":[".tooltip-word {\r\n\t/* padding-top: 12px; */\r\n\tposition: relative;\r\n\tcursor: default;\r\n\ttext-underline-offset: 4px;\r\n\ttext-decoration-style: dashed;\r\n\ttext-decoration-color: red;\r\n}\r\n\r\n.tooltip-container {\r\n\tposition: relative;\r\n\tdisplay: inline-block;\r\n}\r\n\r\n.tooltip-popup {\r\n\tposition: absolute;\r\n\ttop: 0px;\r\n\tleft: 50%;\r\n\t/* transform: translate(-50%, -98%); */\r\n\ttransform: translate(-50%, -100%);\r\n\ttext-align: left;\r\n\tpadding: 10px;\r\n\tmax-width: 300px;\r\n\twidth: max-content;\r\n\t--tooltip-x-position: 50%;\r\n}\r\n.tooltip-popup[aria-hidden=\"true\"] {\r\n\tdisplay: none;\r\n}\r\n\r\n.tooltip-container:hover,\r\n.tooltip-container:focus-visible {\r\n\t.tooltip-popup {\r\n\t\tdisplay: block;\r\n\t}\r\n}\r\n\r\n.tooltip-popup:after {\r\n\tcontent: \"\";\r\n\tdisplay: block;\r\n\tbackground-color: white;\r\n\tposition: absolute;\r\n\ttop: 100%;\r\n\t/* left: 50%; */\r\n\tleft: var(--tooltip-x-position);\r\n\twidth: 20px;\r\n\theight: 20px;\r\n\ttransform: translate(-50%, -50%) rotate(45deg);\r\n\tbox-shadow: 4px 4px 4px rgba(0, 0, 0, 0.08);\r\n}\r\n.tooltip-popup__title {\r\n\tfont-weight: bold;\r\n\tcolor: black !important;\r\n\tpadding-bottom: 10px;\r\n\tmargin-top: 0 !important;\r\n}\r\n.tooltip-popup__definition {\r\n\tcolor: black !important;\r\n\tmargin: 0 !important;\r\n}\r\n\r\n/* FOR THE EDITOR */\r\n.popover_tooltip_field {\r\n\t.components-popover__content {\r\n\t\tpadding: 10px !important;\r\n\t\tmin-width: 200px;\r\n\t}\r\n}\r\n",".boule {\r\n display: inline-block !important;\r\n width: 30px !important;\r\n height: 30px !important;\r\n border-radius: 50% !important;\r\n break-word: break-all !important;\r\n text-align: center !important;\r\n}\r\n",".brochure-download-icon {\r\n\tmargin: 0 0px 0 6px;\r\n\tdisplay: inline-block;\r\n\ttransform: translateY(-1px);\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/build/index.js b/build/index.js index f1108f2..6fdd0b1 100644 --- a/build/index.js +++ b/build/index.js @@ -88,6 +88,49 @@ function getAdminLanguageFromCookie(c_name) { /***/ }), +/***/ "./src/format-types/boule/boule.js": +/*!*****************************************!*\ + !*** ./src/format-types/boule/boule.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_rich_text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text"); +/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__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__); + + + +const formatName = 'homegrade-format/boule'; +const BouleButton = props => { + const { + isActive, + value, + onChange + } = props; + return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.RichTextToolbarButton, { + icon: "editor-code", + title: "Boule", + onClick: () => { + onChange((0,_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__.toggleFormat)(value, { + type: formatName + })); + }, + isActive: isActive + }); +}; +(0,_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_1__.registerFormatType)(formatName, { + title: 'Boule', + tagName: 'span', + className: 'boule', + edit: BouleButton +}); + +/***/ }), + /***/ "./src/format-types/brochure/brochure.js": /*!***********************************************!*\ !*** ./src/format-types/brochure/brochure.js ***! @@ -344,6 +387,18 @@ const Edit = props => { edit: Edit }); +/***/ }), + +/***/ "./src/format-types/boule/boule.css": +/*!******************************************!*\ + !*** ./src/format-types/boule/boule.css ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +// extracted by mini-css-extract-plugin + + /***/ }), /***/ "./src/format-types/brochure/brochure.css": @@ -517,9 +572,13 @@ var __webpack_exports__ = {}; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _format_types_tooltip_tooltip_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format-types/tooltip/tooltip.css */ "./src/format-types/tooltip/tooltip.css"); /* harmony import */ var _format_types_tooltip_tooltip_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./format-types/tooltip/tooltip.js */ "./src/format-types/tooltip/tooltip.js"); -/* harmony import */ var _blocks_utilities_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../blocks/utilities.js */ "./blocks/utilities.js"); -/* harmony import */ var _format_types_brochure_brochure_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./format-types/brochure/brochure.css */ "./src/format-types/brochure/brochure.css"); -/* harmony import */ var _format_types_brochure_brochure_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./format-types/brochure/brochure.js */ "./src/format-types/brochure/brochure.js"); +/* harmony import */ var _format_types_boule_boule_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./format-types/boule/boule.css */ "./src/format-types/boule/boule.css"); +/* harmony import */ var _blocks_utilities_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../blocks/utilities.js */ "./blocks/utilities.js"); +/* harmony import */ var _format_types_brochure_brochure_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./format-types/brochure/brochure.css */ "./src/format-types/brochure/brochure.css"); +/* harmony import */ var _format_types_brochure_brochure_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./format-types/brochure/brochure.js */ "./src/format-types/brochure/brochure.js"); +/* harmony import */ var _format_types_boule_boule_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./format-types/boule/boule.js */ "./src/format-types/boule/boule.js"); + + diff --git a/build/index.js.map b/build/index.js.map index fe5f49f..531c904 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,cAAc;MAClB,OAAO,yBAAyB;IAEjC,KAAK,WAAW;IAChB,KAAK,cAAc;MAClB,OAAO,qBAAqB;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,IACR8B,iEAAA,CAACvC,gEAAa;IACb6C,IAAI,EAAE1C,wDAAM;IACZ2C,KAAK,EAAE,sBAAuB;IAC9BC,OAAO,EAAEA,CAAA,KAAM;MACdT,YAAY,CAAC,CAAC;IACf;EAAE,CACF,CAEW,CACA,CACd,CAAC;AAEL,CAAC;AAEDjD,wEAAkB,CAACiB,UAAU,EAAE;EAC9B0C,KAAK,EAAEvD,mDAAE,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 \"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-securite-salubrite\":\r\n\t\t\treturn \"patrimoine-sante-securite\";\r\n\r\n\t\tcase \"location-achat\":\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
index
;\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 +{"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,cAAc;MAClB,OAAO,yBAAyB;IAEjC,KAAK,WAAW;IAChB,KAAK,cAAc;MAClB,OAAO,qBAAqB;IAE7B,KAAK,UAAU;IACf,KAAK,WAAW;MACf,OAAO,oBAAoB;IAE5B,KAAK,YAAY;IACjB,KAA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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;AACH;AAER;AACc;AACD;AACN;;AAEvC;;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/boule/boule.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/boule/boule.css?1cf1","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 \"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-securite-salubrite\":\r\n\t\t\treturn \"patrimoine-sante-securite\";\r\n\r\n\t\tcase \"location-achat\":\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 } from '@wordpress/rich-text';\r\nimport { RichTextToolbarButton } from '@wordpress/block-editor';\r\n\r\nconst formatName = 'homegrade-format/boule';\r\n\r\nconst BouleButton = (props) => {\r\n const { isActive, value, onChange } = props;\r\n return (\r\n {\r\n onChange(\r\n toggleFormat(value, {\r\n type: formatName,\r\n })\r\n );\r\n }}\r\n isActive={isActive}\r\n />\r\n );\r\n};\r\nregisterFormatType(formatName, {\r\n title: 'Boule',\r\n tagName: 'span',\r\n className: 'boule',\r\n edit: BouleButton,\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 {};","// 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\nimport './format-types/boule/boule.css';\r\n\r\nimport '../blocks/utilities.js';\r\nimport './format-types/brochure/brochure.css';\r\nimport './format-types/brochure/brochure.js';\r\nimport './format-types/boule/boule.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
index
;\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","RichTextToolbarButton","formatName","BouleButton","props","isActive","value","onChange","createElement","icon","title","onClick","type","tagName","className","edit","applyFormat","getActiveFormats","__","BlockControls","__experimentalLinkControl","LinkControl","Popover","Button","ToolbarGroup","ToolbarButton","TextareaControl","check","trash","useState","useSelect","BrochureLinkFormatButton","isPopoverOpen","setIsPopoverOpen","relatedPost","setRelatedPost","pendingBrochure","setPendingBrochure","activeFormat","filter","format","brochurePost","select","attributes","brochurePostID","getEntityRecord","brochureAttachedMedia","acf","brochure_pdf","setFormat","postDatas","href","url","id","toString","target","style","removeFormat","Fragment","onClose","suggestionsQuery","subtype","label","brochureID","Edit","pendingDefinition","setPendingDefinition","lang","definitionId","dataTooltipWord","post","dataTooltipDefinition","definition","link","tile","kind","isCollapsed"],"sourceRoot":""} \ No newline at end of file diff --git a/homegrade-blocks.php b/homegrade-blocks.php index eb3821f..1b35070 100644 --- a/homegrade-blocks.php +++ b/homegrade-blocks.php @@ -160,6 +160,7 @@ function homegrade_blocks_plugin_enqueue_assets() wp_enqueue_style('homegrade-blocks-tooltipcss', plugin_dir_url(__FILE__) . 'src/format-types/tooltip/tooltip.css'); wp_enqueue_script('homegrade-blocks-brochurejs', plugin_dir_url(__FILE__) . 'src/format-types/brochure/brochure-front.js'); } + wp_enqueue_style('homegrade-blocks-boulecss', plugin_dir_url(__FILE__) . 'src/format-types/boule/boule.css'); // #PASSING TRANSLATIONS wp_register_script('homegrade-blocks-brochurejs', plugin_dir_url(__FILE__) . 'src/format-types/brochure/brochure-front.js'); diff --git a/src/format-types/boule/boule.css b/src/format-types/boule/boule.css new file mode 100644 index 0000000..7fa1e5e --- /dev/null +++ b/src/format-types/boule/boule.css @@ -0,0 +1,8 @@ +.boule { + display: inline-block !important; + width: 30px !important; + height: 30px !important; + border-radius: 50% !important; + break-word: break-all !important; + text-align: center !important; +} diff --git a/src/format-types/boule/boule.js b/src/format-types/boule/boule.js new file mode 100644 index 0000000..8666a96 --- /dev/null +++ b/src/format-types/boule/boule.js @@ -0,0 +1,28 @@ +import { registerFormatType, toggleFormat } from '@wordpress/rich-text'; +import { RichTextToolbarButton } from '@wordpress/block-editor'; + +const formatName = 'homegrade-format/boule'; + +const BouleButton = (props) => { + const { isActive, value, onChange } = props; + return ( + { + onChange( + toggleFormat(value, { + type: formatName, + }) + ); + }} + isActive={isActive} + /> + ); +}; +registerFormatType(formatName, { + title: 'Boule', + tagName: 'span', + className: 'boule', + edit: BouleButton, +}); diff --git a/src/index.js b/src/index.js index 8b647d2..d1fa7f7 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,11 @@ -import "./format-types/tooltip/tooltip.css"; -import "./format-types/tooltip/tooltip.js"; +import './format-types/tooltip/tooltip.css'; +import './format-types/tooltip/tooltip.js'; +import './format-types/boule/boule.css'; -import "../blocks/utilities.js"; -import "./format-types/brochure/brochure.css"; -import "./format-types/brochure/brochure.js"; +import '../blocks/utilities.js'; +import './format-types/brochure/brochure.css'; +import './format-types/brochure/brochure.js'; +import './format-types/boule/boule.js'; // import React from "react";