diff --git a/assets/js/utils.js b/assets/js/utils.js new file mode 100644 index 0000000..dbb15a5 --- /dev/null +++ b/assets/js/utils.js @@ -0,0 +1,79 @@ +/** + * Utils JS functions + * + */ + +/** + * WordPress dependencies + */ +import { useState, useEffect } from 'react'; + +/** + * Clean URL + * + * @param url + * @returns {*} + */ +const cleanUrl = (url) => { + let cleanedUrl = url.replace(/:\//g, '://'); + cleanedUrl = cleanedUrl.replace(/([^:]\/)\/+/g, '$1'); + cleanedUrl = cleanedUrl.replace(/^\/+|\/+$/g, ''); + return cleanedUrl; +}; + +/** + * Get datas from DigiRisk module on Dolibarr + * + * @param route + * @param params + * @returns {{data: unknown, error: unknown}} + */ +export const digiriskApiGet = (route, params) => { + const [data, setData] = useState(null); + const [error, setError] = useState(null); + + useEffect(() => { + const fetchData = async () => { + if (!params) { + return; + } + const { eoblocks_dolibarr_url: baseUrlApi, eoblocks_dolibarr_api_key: apiKey } = params; + if (!baseUrlApi || !apiKey || !route) { + setError('Missing API key or base URL or route'); + return; + } + + let digiriskUrlApi = `${baseUrlApi}/api/index.php/${route}?DOLAPIKEY=${apiKey}`; + digiriskUrlApi = cleanUrl(digiriskUrlApi); + + try { + const response = await fetch(digiriskUrlApi); + + if (!response.ok) { + if (response.status === 401) { + setError('Unauthorized: Wrong API Key or Unauthorized'); + } else if (response.status === 404) { + setError('Not Found: Wrong Dolibarr URL'); + } else { + setError(`Error: ${response.status}`); + } + return; + } + + const data = await response.json(); + + if (data.error) { + setError('Error in API response'); + return; + } + + setData(data); + } catch (err) { + setError(err.message); + } + }; + fetchData(); + }, [route, params]); + + return { data, error }; +} diff --git a/blocks/build/digirisk-list-risk/index.asset.php b/blocks/build/digirisk-list-risk/index.asset.php index e2fd8b3..152ae26 100644 --- a/blocks/build/digirisk-list-risk/index.asset.php +++ b/blocks/build/digirisk-list-risk/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '654d2362268332228fac'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => 'a991e2130badc69da2e5'); diff --git a/blocks/build/digirisk-list-risk/index.css.map b/blocks/build/digirisk-list-risk/index.css.map index 513885d..502f454 100644 --- a/blocks/build/digirisk-list-risk/index.css.map +++ b/blocks/build/digirisk-list-risk/index.css.map @@ -1 +1 @@ -{"version":3,"file":"digirisk-list-risk/index.css","mappings":";;;AAAA;;;;EAAA,C","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"digirisk-list-risk/index.css","mappings":";;;AAAA;;;;EAAA,C","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/editor.scss"],"sourcesContent":["/**\r\n * The following styles get applied inside the editor only.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/digirisk-list-risk/index.js b/blocks/build/digirisk-list-risk/index.js index 39b5980..1398965 100644 --- a/blocks/build/digirisk-list-risk/index.js +++ b/blocks/build/digirisk-list-risk/index.js @@ -2,6 +2,98 @@ /******/ "use strict"; /******/ var __webpack_modules__ = ({ +/***/ "./assets/js/utils.js": +/*!****************************!*\ + !*** ./assets/js/utils.js ***! + \****************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ digiriskApiGet: () => (/* binding */ digiriskApiGet) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/** + * Utils JS functions + * + */ + +/** + * WordPress dependencies + */ + + +/** + * Clean URL + * + * @param url + * @returns {*} + */ +const cleanUrl = url => { + let cleanedUrl = url.replace(/:\//g, '://'); + cleanedUrl = cleanedUrl.replace(/([^:]\/)\/+/g, '$1'); + cleanedUrl = cleanedUrl.replace(/^\/+|\/+$/g, ''); + return cleanedUrl; +}; + +/** + * Get datas from DigiRisk module on Dolibarr + * + * @param route + * @param params + * @returns {{data: unknown, error: unknown}} + */ +const digiriskApiGet = (route, params) => { + const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); + const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); + (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { + const fetchData = async () => { + if (!params) { + return; + } + const { + eoblocks_dolibarr_url: baseUrlApi, + eoblocks_dolibarr_api_key: apiKey + } = params; + if (!baseUrlApi || !apiKey || !route) { + setError('Missing API key or base URL or route'); + return; + } + let digiriskUrlApi = `${baseUrlApi}/api/index.php/${route}?DOLAPIKEY=${apiKey}`; + digiriskUrlApi = cleanUrl(digiriskUrlApi); + try { + const response = await fetch(digiriskUrlApi); + if (!response.ok) { + if (response.status === 401) { + setError('Unauthorized: Wrong API Key or Unauthorized'); + } else if (response.status === 404) { + setError('Not Found: Wrong Dolibarr URL'); + } else { + setError(`Error: ${response.status}`); + } + return; + } + const data = await response.json(); + if (data.error) { + setError('Error in API response'); + return; + } + setData(data); + } catch (err) { + setError(err.message); + } + }; + fetchData(); + }, [route, params]); + return { + data, + error + }; +}; + +/***/ }), + /***/ "./blocks/src/digirisk-list-risk/edit.js": /*!***********************************************!*\ !*** ./blocks/src/digirisk-list-risk/edit.js ***! @@ -22,7 +114,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var _scss_editor_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./scss/editor.scss */ "./blocks/src/digirisk-list-risk/scss/editor.scss"); +/* harmony import */ var _assets_js_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../../assets/js/utils */ "./assets/js/utils.js"); +/* harmony import */ var _scss_editor_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./scss/editor.scss */ "./blocks/src/digirisk-list-risk/scss/editor.scss"); /** * Retrieves the translation of text. @@ -69,60 +162,14 @@ function Edit({ displayRisk3, displayRisk4 } = attributes; - const [data, setData] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); - const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(); const customTooltipContent = value => `${value}`; const routeApi = 'digiriskdolibarr/risk/getRisksByCotation'; const eoblocksSettings = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select('core').getSite()?.eoblocks_settings); - - // @TODO: Isoler la fonction API dans un helper. - // Clean URL. - const cleanUrl = url => { - let cleanedUrl = url.replace(/:\//g, '://'); - cleanedUrl = cleanedUrl.replace(/([^:]\/)\/+/g, '$1'); - cleanedUrl = cleanedUrl.replace(/^\/+|\/+$/g, ''); - return cleanedUrl; - }; - (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { - const fetchData = async () => { - if (!eoblocksSettings) { - return; - } - const { - eoblocks_dolibarr_url: baseUrlApi, - eoblocks_dolibarr_api_key: apiKey - } = eoblocksSettings; - if (!baseUrlApi || !apiKey || !routeApi) { - setError('Missing API key or base URL or route'); - return; - } - let digiriskUrlApi = `${baseUrlApi}/api/index.php/${routeApi}?DOLAPIKEY=${apiKey}`; - digiriskUrlApi = cleanUrl(digiriskUrlApi); - try { - const response = await fetch(digiriskUrlApi); - if (!response.ok) { - if (response.status === 401) { - setError('Unauthorized: Wrong API Key or Unauthorized'); - } else if (response.status === 404) { - setError('Not Found: Wrong Dolibarr URL'); - } else { - setError(`Error: ${response.status}`); - } - return; - } - const data = await response.json(); - if (data.error) { - setError('Error in API response'); - return; - } - setData(data); - } catch (err) { - setError(err.message); - } - }; - fetchData(); - }, [eoblocksSettings, routeApi]); + const { + data, + error + } = (0,_assets_js_utils__WEBPACK_IMPORTED_MODULE_5__.digiriskApiGet)(routeApi, eoblocksSettings); if (error) { console.log('Error:' + error); } diff --git a/blocks/build/digirisk-list-risk/index.js.map b/blocks/build/digirisk-list-risk/index.js.map index 10d14a8..03d9c47 100644 --- a/blocks/build/digirisk-list-risk/index.js.map +++ b/blocks/build/digirisk-list-risk/index.js.map @@ -1 +1 @@ -{"version":3,"file":"digirisk-list-risk/index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACqC;;AAErC;AACA;AACA;AACA;AACA;AACA;AAC2E;AACK;AACpC;AACA;;AAG5C;AACA;AACA;AACA;AACA;AACA;AAC4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASS,IAAIA,CAAE;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAG;EAC7D,MAAM;IAAEC,SAAS;IAAEC,YAAY;IAAEC,YAAY;IAAEC,YAAY;IAAEC;EAAa,CAAC,GAAGN,UAAU;EACxF,MAAM,CAACO,IAAI,EAAEC,OAAO,CAAC,GAAGV,+CAAQ,CAAC,EAAE,CAAC;EACpC,MAAM,CAACW,KAAK,EAAEC,QAAQ,CAAC,GAAGZ,+CAAQ,CAAC,EAAE,CAAC;EACtC,MAAMa,UAAU,GAAGnB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S,CAAC,CACtM,CACL;;AAED;AACA;AACA;AACA;AACA;AACAL,oEAAiB,CAAEC,6CAAa,EAAE;EACjC;AACD;AACA;EACCM,IAAI,EAAEjE,6CAAI;EACVkE,IAAI,EAAEN;AACP,CAAE,CAAC;;;;;;;;;;;ACxCH;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/edit.js","webpack://eo-blocks/./blocks/src/digirisk-list-risk/index.js","webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/editor.scss","webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/style.scss","webpack://eo-blocks/external window \"React\"","webpack://eo-blocks/external window [\"wp\",\"blockEditor\"]","webpack://eo-blocks/external window [\"wp\",\"blocks\"]","webpack://eo-blocks/external window [\"wp\",\"components\"]","webpack://eo-blocks/external window [\"wp\",\"data\"]","webpack://eo-blocks/external window [\"wp\",\"i18n\"]","webpack://eo-blocks/webpack/bootstrap","webpack://eo-blocks/webpack/runtime/chunk loaded","webpack://eo-blocks/webpack/runtime/compat get default export","webpack://eo-blocks/webpack/runtime/define property getters","webpack://eo-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://eo-blocks/webpack/runtime/make namespace object","webpack://eo-blocks/webpack/runtime/jsonp chunk loading","webpack://eo-blocks/webpack/before-startup","webpack://eo-blocks/webpack/startup","webpack://eo-blocks/webpack/after-startup"],"sourcesContent":["/**\n * Retrieves the translation of text.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * React hook that is used to mark the block wrapper element.\n * It provides all the necessary props like the class name.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops\n */\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, RangeControl, ToggleControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from 'react';\n\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * Those files can contain any CSS code that gets applied to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './scss/editor.scss';\n\n/**\n * The edit function describes the structure of your block in the context of the\n * editor. This represents what the editor will render when the block is used.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit\n *\n * @return {Element} Element to render.\n */\nexport default function Edit( { attributes, setAttributes } ) {\n\tconst { blockGrid, displayRisk1, displayRisk2, displayRisk3, displayRisk4 } = attributes;\n\tconst [data, setData] = useState([]);\n\tconst [error, setError] = useState([]);\n\tconst blockProps = useBlockProps();\n\tconst customTooltipContent = value => `${value}`;\n\n\tconst routeApi = 'digiriskdolibarr/risk/getRisksByCotation';\n\tconst eoblocksSettings = useSelect( ( select ) => select( 'core' ).getSite()?.eoblocks_settings );\n\n\t// @TODO: Isoler la fonction API dans un helper.\n\t// Clean URL.\n\tconst cleanUrl = (url) => {\n\t\tlet cleanedUrl = url.replace(/:\\//g, '://');\n\t\tcleanedUrl = cleanedUrl.replace(/([^:]\\/)\\/+/g, '$1');\n\t\tcleanedUrl = cleanedUrl.replace(/^\\/+|\\/+$/g, '');\n\t\treturn cleanedUrl;\n\t};\n\n\tuseEffect(() => {\n\t\tconst fetchData = async () => {\n\t\t\tif (!eoblocksSettings) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { eoblocks_dolibarr_url: baseUrlApi, eoblocks_dolibarr_api_key: apiKey } = eoblocksSettings;\n\t\t\tif (!baseUrlApi || !apiKey || !routeApi) {\n\t\t\t\tsetError('Missing API key or base URL or route');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet digiriskUrlApi = `${baseUrlApi}/api/index.php/${routeApi}?DOLAPIKEY=${apiKey}`;\n\t\t\tdigiriskUrlApi = cleanUrl(digiriskUrlApi);\n\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(digiriskUrlApi);\n\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tif (response.status === 401) {\n\t\t\t\t\t\tsetError('Unauthorized: Wrong API Key or Unauthorized');\n\t\t\t\t\t} else if (response.status === 404) {\n\t\t\t\t\t\tsetError('Not Found: Wrong Dolibarr URL');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetError(`Error: ${response.status}`);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (data.error) {\n\t\t\t\t\tsetError('Error in API response');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetData(data);\n\t\t\t} catch (err) {\n\t\t\t\tsetError(err.message);\n\t\t\t}\n\t\t};\n\t\tfetchData();\n\t}, [eoblocksSettings, routeApi]);\n\n\tif (error) {\n\t\tconsole.log('Error:' + error);\n\t}\n\n\tconst riskLabel = {\n\t\t1: __( 'faible', 'eo-blocks' ),\n\t\t2: __( 'à planifier', 'eo-blocks' ),\n\t\t3: __( 'à traiter', 'eo-blocks' ),\n\t\t4: __( 'inacceptable', 'eo-blocks' )\n\t}\n\tconst riskRender = {\n\t\t1: displayRisk1,\n\t\t2: displayRisk2,\n\t\t3: displayRisk3,\n\t\t4: displayRisk4\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t setAttributes( { displayRisk1: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { displayRisk2: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { displayRisk3: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { displayRisk4: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { blockGrid: value } ) }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 4 }\n\t\t\t\t\t\trenderTooltipContent={ customTooltipContent }\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t{data && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{Object.entries(data).map(([key, value]) => {\n\t\t\t\t\t\t\tif (!riskRender[key]) {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
{__('Risque', 'eo-blocks')}
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
{value}
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
{riskLabel[key]}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t})}\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t
\n\t\t\n\t);\n}\n","/**\n * Registers a new block provided a unique name and an object defining its behavior.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * All files containing `style` keyword are bundled together. The code used\n * gets applied both to the front of your site and to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './scss/style.scss';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport metadata from './block.json';\n\nconst blockIcon = (\n\t\n\t\t\n\t\t\n\t\n);\n\n/**\n * Every block starts by registering a new block type definition.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nregisterBlockType( metadata.name, {\n\t/**\n\t * @see ./edit.js\n\t */\n\tedit: Edit,\n\ticon: blockIcon,\n} );\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\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","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\"digirisk-list-risk/index\": 0,\n\t\"digirisk-list-risk/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[\"webpackChunkeo_blocks\"] = globalThis[\"webpackChunkeo_blocks\"] || [];\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, [\"digirisk-list-risk/style-index\"], () => (__webpack_require__(\"./blocks/src/digirisk-list-risk/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","InspectorControls","useBlockProps","PanelBody","RangeControl","ToggleControl","useSelect","useEffect","useState","Edit","attributes","setAttributes","blockGrid","displayRisk1","displayRisk2","displayRisk3","displayRisk4","data","setData","error","setError","blockProps","customTooltipContent","value","routeApi","eoblocksSettings","select","getSite","eoblocks_settings","cleanUrl","url","cleanedUrl","replace","fetchData","eoblocks_dolibarr_url","baseUrlApi","eoblocks_dolibarr_api_key","apiKey","digiriskUrlApi","response","fetch","ok","status","json","err","message","console","log","riskLabel","riskRender","createElement","Fragment","title","label","checked","onChange","min","max","renderTooltipContent","className","Object","entries","map","key","xmlns","viewBox","d","registerBlockType","metadata","blockIcon","width","height","fill","name","edit","icon"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"digirisk-list-risk/index.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC4C;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,QAAQ,GAAIC,GAAG,IAAK;EACzB,IAAIC,UAAU,GAAGD,GAAG,CAACE,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;EAC3CD,UAAU,GAAGA,UAAU,CAACC,OAAO,CAAC,cAAc,EAAE,IAAI,CAAC;EACrDD,UAAU,GAAGA,UAAU,CAACC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;EACjD,OAAOD,UAAU;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,cAAc,GAAGA,CAACC,KAAK,EAAEC,MAAM,KAAK;EAChD,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGV,+CAAQ,CAAC,IAAI,CAAC;EACtC,MAAM,CAACW,KAAK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;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://eo-blocks/./assets/js/utils.js","webpack://eo-blocks/./blocks/src/digirisk-list-risk/edit.js","webpack://eo-blocks/./blocks/src/digirisk-list-risk/index.js","webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/editor.scss","webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/style.scss","webpack://eo-blocks/external window \"React\"","webpack://eo-blocks/external window [\"wp\",\"blockEditor\"]","webpack://eo-blocks/external window [\"wp\",\"blocks\"]","webpack://eo-blocks/external window [\"wp\",\"components\"]","webpack://eo-blocks/external window [\"wp\",\"data\"]","webpack://eo-blocks/external window [\"wp\",\"i18n\"]","webpack://eo-blocks/webpack/bootstrap","webpack://eo-blocks/webpack/runtime/chunk loaded","webpack://eo-blocks/webpack/runtime/compat get default export","webpack://eo-blocks/webpack/runtime/define property getters","webpack://eo-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://eo-blocks/webpack/runtime/make namespace object","webpack://eo-blocks/webpack/runtime/jsonp chunk loading","webpack://eo-blocks/webpack/before-startup","webpack://eo-blocks/webpack/startup","webpack://eo-blocks/webpack/after-startup"],"sourcesContent":["/**\n * Utils JS functions\n *\n */\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from 'react';\n\n/**\n * Clean URL\n *\n * @param url\n * @returns {*}\n */\nconst cleanUrl = (url) => {\n\tlet cleanedUrl = url.replace(/:\\//g, '://');\n\tcleanedUrl = cleanedUrl.replace(/([^:]\\/)\\/+/g, '$1');\n\tcleanedUrl = cleanedUrl.replace(/^\\/+|\\/+$/g, '');\n\treturn cleanedUrl;\n};\n\n/**\n * Get datas from DigiRisk module on Dolibarr\n *\n * @param route\n * @param params\n * @returns {{data: unknown, error: unknown}}\n */\nexport const digiriskApiGet = (route, params) => {\n\tconst [data, setData] = useState(null);\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\tconst fetchData = async () => {\n\t\t\tif (!params) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { eoblocks_dolibarr_url: baseUrlApi, eoblocks_dolibarr_api_key: apiKey } = params;\n\t\t\tif (!baseUrlApi || !apiKey || !route) {\n\t\t\t\tsetError('Missing API key or base URL or route');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet digiriskUrlApi = `${baseUrlApi}/api/index.php/${route}?DOLAPIKEY=${apiKey}`;\n\t\t\tdigiriskUrlApi = cleanUrl(digiriskUrlApi);\n\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(digiriskUrlApi);\n\n\t\t\t\tif (!response.ok) {\n\t\t\t\t\tif (response.status === 401) {\n\t\t\t\t\t\tsetError('Unauthorized: Wrong API Key or Unauthorized');\n\t\t\t\t\t} else if (response.status === 404) {\n\t\t\t\t\t\tsetError('Not Found: Wrong Dolibarr URL');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetError(`Error: ${response.status}`);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst data = await response.json();\n\n\t\t\t\tif (data.error) {\n\t\t\t\t\tsetError('Error in API response');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsetData(data);\n\t\t\t} catch (err) {\n\t\t\t\tsetError(err.message);\n\t\t\t}\n\t\t};\n\t\tfetchData();\n\t}, [route, params]);\n\n\treturn { data, error };\n}\n","/**\n * Retrieves the translation of text.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * React hook that is used to mark the block wrapper element.\n * It provides all the necessary props like the class name.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops\n */\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, RangeControl, ToggleControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { digiriskApiGet } from './../../../assets/js/utils';\n\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * Those files can contain any CSS code that gets applied to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './scss/editor.scss';\n\n/**\n * The edit function describes the structure of your block in the context of the\n * editor. This represents what the editor will render when the block is used.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit\n *\n * @return {Element} Element to render.\n */\nexport default function Edit( { attributes, setAttributes } ) {\n\tconst { blockGrid, displayRisk1, displayRisk2, displayRisk3, displayRisk4 } = attributes;\n\tconst blockProps = useBlockProps();\n\tconst customTooltipContent = value => `${value}`;\n\n\tconst routeApi = 'digiriskdolibarr/risk/getRisksByCotation';\n\tconst eoblocksSettings = useSelect( ( select ) => select( 'core' ).getSite()?.eoblocks_settings );\n\tconst { data, error } = digiriskApiGet(routeApi, eoblocksSettings);\n\n\tif (error) {\n\t\tconsole.log('Error:' + error);\n\t}\n\n\tconst riskLabel = {\n\t\t1: __( 'faible', 'eo-blocks' ),\n\t\t2: __( 'à planifier', 'eo-blocks' ),\n\t\t3: __( 'à traiter', 'eo-blocks' ),\n\t\t4: __( 'inacceptable', 'eo-blocks' )\n\t}\n\tconst riskRender = {\n\t\t1: displayRisk1,\n\t\t2: displayRisk2,\n\t\t3: displayRisk3,\n\t\t4: displayRisk4\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t setAttributes( { displayRisk1: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { displayRisk2: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { displayRisk3: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { displayRisk4: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { blockGrid: value } ) }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 4 }\n\t\t\t\t\t\trenderTooltipContent={ customTooltipContent }\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t{data && (\n\t\t\t\t\t
\n\t\t\t\t\t\t{Object.entries(data).map(([key, value]) => {\n\t\t\t\t\t\t\tif (!riskRender[key]) {\n\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t
{__('Risque', 'eo-blocks')}
\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t
{value}
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
{riskLabel[key]}
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t})}\n\t\t\t\t\t
\n\t\t\t\t)}\n\t\t\t
\n\t\t\n\t);\n}\n","/**\r\n * Registers a new block provided a unique name and an object defining its behavior.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nimport { registerBlockType } from '@wordpress/blocks';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * All files containing `style` keyword are bundled together. The code used\r\n * gets applied both to the front of your site and to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './scss/style.scss';\r\n\r\n/**\r\n * Internal dependencies\r\n */\r\nimport Edit from './edit';\r\nimport metadata from './block.json';\r\n\r\nconst blockIcon = (\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n);\r\n\r\n/**\r\n * Every block starts by registering a new block type definition.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nregisterBlockType( metadata.name, {\r\n\t/**\r\n\t * @see ./edit.js\r\n\t */\r\n\tedit: Edit,\r\n\ticon: blockIcon,\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\"][\"components\"];","module.exports = window[\"wp\"][\"data\"];","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\"digirisk-list-risk/index\": 0,\n\t\"digirisk-list-risk/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[\"webpackChunkeo_blocks\"] = globalThis[\"webpackChunkeo_blocks\"] || [];\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, [\"digirisk-list-risk/style-index\"], () => (__webpack_require__(\"./blocks/src/digirisk-list-risk/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["useState","useEffect","cleanUrl","url","cleanedUrl","replace","digiriskApiGet","route","params","data","setData","error","setError","fetchData","eoblocks_dolibarr_url","baseUrlApi","eoblocks_dolibarr_api_key","apiKey","digiriskUrlApi","response","fetch","ok","status","json","err","message","__","InspectorControls","useBlockProps","PanelBody","RangeControl","ToggleControl","useSelect","Edit","attributes","setAttributes","blockGrid","displayRisk1","displayRisk2","displayRisk3","displayRisk4","blockProps","customTooltipContent","value","routeApi","eoblocksSettings","select","getSite","eoblocks_settings","console","log","riskLabel","riskRender","createElement","Fragment","title","label","checked","onChange","min","max","renderTooltipContent","className","Object","entries","map","key","xmlns","viewBox","d","registerBlockType","metadata","blockIcon","width","height","fill","name","edit","icon"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/digirisk-list-risk/style-index.css.map b/blocks/build/digirisk-list-risk/style-index.css.map index b33bddc..6f45dd1 100644 --- a/blocks/build/digirisk-list-risk/style-index.css.map +++ b/blocks/build/digirisk-list-risk/style-index.css.map @@ -1 +1 @@ -{"version":3,"file":"digirisk-list-risk/style-index.css","mappings":";;;AAAA;;;;;EAAA;AASA;EACE;EACA;EACA;EACA;AAFF;;AAMG;EACA;AAHH;AAMC;EAIE;AAPH;AASG;EACD;EAEA;EACA;AARF;AAUE;EACE;AARJ;AAUI;EACC;AARL;AAWE;EACE;AATJ;AAWI;EACD;AATH;AAYE;EACE;EACA;AAVJ;AAYI;EACD;AAVH;AAaE;EACE;EACA;AAXJ;AAaI;EACD;AAXH;AAeE;EACE;EACA;EACA;EACA;AAbJ;AAeI;EACD;EACA;AAbH;AAgBE;EACE;EACA;AAdJ;AAgBE;EACE;EACA;AAdJ;AAgBE;EACE;EACA;EACA;EACA;EACA;AAdJ;AAgBE;EACE;EACA;AAdJ;;AAqBA;EACE;EACA;EACA;AAlBF;AAsBC;EACE;AApBH;AA0BE;EACE;AAxBJ;AAgBC;EACE;AAdH;AAoBE;EACE;AAlBJ;AAiBE;EACE;AAfJ;AAkBG;EAJD;IAKG;EAfH;AACF;AAEC;EACE;AAAH;AAME;EACE;AAJJ;AAGE;EACE;AADJ;AAIG;EAJD;IAKG;EADH;AACF;AALE;EACE;AAOJ;AAJG;EAJD;IAKG;EAOH;AACF;AApBC;EACE;AAsBH;AAhBE;EACE;AAkBJ;AAnBE;EACE;AAqBJ;AAlBG;EAJD;IAKG;EAqBH;AACF;AA3BE;EACE;AA6BJ;AA1BG;EAJD;IAKG;EA6BH;AACF;AAnCE;EACE;AAqCJ;AAlCG;EAJD;IAKG;EAqCH;AACF;AAlDC;EACE;AAoDH;AA9CE;EACE;AAgDJ;AAjDE;EACE;AAmDJ;AAhDG;EAJD;IAKG;EAmDH;AACF;AAzDE;EACE;AA2DJ;AAxDG;EAJD;IAKG;EA2DH;AACF;AAj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EADC;IAEC;EAgND;AACF,C","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n$media__mobile: 599px;\n\n:root {\n --eo-digirisk-list-risk-1: #ECECEC;\n --eo-digirisk-list-risk-2: #E9AD4F;\n --eo-digirisk-list-risk-3: #E05353;\n --eo-digirisk-list-risk-4: #313131;\n}\n\n.wp-block-eo-digirisk-list-risk {\n \t* {\n\t box-sizing: border-box;\n\t}\n\n\t.eo-digirisk-list-risk__list {\n\t //display: flex;\n\t //flex-wrap: wrap;\n\t //gap: 2em;\n\t width: 100%;\n\n\t .eo-digirisk-list-risk__element {\n\t\twidth: 100%;\n\t\t//min-width: 50%;\n\t\tpadding: 1em;\n\t\tborder-radius: 16px;\n\n\t\t&.--risk-1 {\n\t\t background: var(--eo-digirisk-list-risk-1);\n\n\t\t .eo-digirisk-list-risk__icon-risk {\n\t\t\t fill: #C3C3C3;\n\t\t }\n\t\t}\n\t\t&.--risk-2 {\n\t\t background: var(--eo-digirisk-list-risk-2);\n\n\t\t .eo-digirisk-list-risk__icon-risk {\n\t\t\tfill: #E57128;\n\t\t }\n\t\t}\n\t\t&.--risk-3 {\n\t\t background: var(--eo-digirisk-list-risk-3);\n\t\t color: #fff;\n\n\t\t .eo-digirisk-list-risk__icon-risk {\n\t\t\tfill: #C31D1D;\n\t\t }\n\t\t}\n\t\t&.--risk-4 {\n\t\t background: var(--eo-digirisk-list-risk-4);\n\t\t color: #fff;\n\n\t\t .eo-digirisk-list-risk__icon-risk {\n\t\t\tfill: #767676;\n\t\t }\n\t\t}\n\n\t\t.eo-digirisk-list-risk__content {\n\t\t display: flex;\n\t\t flex-wrap: wrap;\n\t\t gap: 1em;\n\t\t align-items: flex-end;\n\n\t\t .eo-digirisk-list-risk__content-label-group {\n\t\t\tmin-width: 50%;\n\t\t\tmax-width: 50%;\n\t\t }\n\t\t}\n\t\t.eo-digirisk-list-risk__icon-risk {\n\t\t fill: #fff;\n\t\t max-width: 20px;\n\t\t}\n\t\t.eo-digirisk-list-risk__content-label {\n\t\t text-transform: uppercase;\n\t\t font-size: 0.9em;\n\t\t}\n\t\t.eo-digirisk-list-risk__content-risk {\n\t\t font-size: 2.2em;\n\t\t font-weight: 900;\n\t\t text-align: right;\n\t\t flex-grow: 1;\n\t\t line-height: 1;\n\t\t}\n\t\t.eo-digirisk-list-risk__label {\n\t\t font-size: 1.2em;\n\t\t font-weight: 600;\n\t\t}\n\t }\n\t}\n}\n\n// @TODO A deplacer dans un framework interne au plugin\n.eo-grid {\n display: grid;\n grid-gap: 1em 1em;\n grid-template-columns: repeat( 4, 1fr );\n\n // Définition des tailles.\n @for $i from 1 through 6 {\n\t&.eo-grid__col-#{$i} {\n\t grid-template-columns: repeat( $i, 1fr );\n\t}\n\n\t// Chaque enfant peut modifier sa propre taille.\n\t@for $y from 1 through 6 {\n\t @if ( $y <= $i ) {\n\t\t&.eo-grid__col-#{$i} > .eo-grid__width-#{$y} {\n\t\t grid-column: auto / span $y;\n\n\t\t @if ( $y > 1 ) {\n\t\t\t@media ( max-width: 920px ) {\n\t\t\t grid-column: auto / span 2;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t}\n }\n\n // Définition des hauteurs des enfants.\n @for $i from 1 through 6 {\n\t> .eo-grid__height-#{$i} {\n\t grid-row: auto / span $i;\n\n\t @media ( max-width: 920px ) {\n\t\tgrid-row: auto / span 1 !important;\n\t }\n\t}\n }\n\n // Marges.\n @for $i from 0 through 6 {\n\t&.eo-grid__margin-#{$i} {\n\t margin: #{$i}em 0;\n\t}\n }\n\n // Gouttières.\n @for $i from 0 through 6 {\n\t&.eo-grid__gap-#{$i} {\n\t grid-gap: #{$i}em #{$i}em;\n\t}\n }\n\n // Responsive.\n @for $i from 1 through 6 {\n\t@if ( $i > 2 ) {\n\t @media ( max-width: 920px ) {\n\t\t&.eo-grid__col-#{$i} {\n\t\t grid-template-columns: repeat( 2, 1fr ) !important;\n\t\t}\n\t }\n\t}\n\t@if ( $i > 1 ) {\n\t @media ( max-width: $media__mobile ) {\n\t\t&.eo-grid__col-#{$i} {\n\t\t grid-template-columns: repeat( 1, 1fr ) !important;\n\t\t}\n\t }\n\t}\n\n }\n > * {\n\t@media ( max-width: $media__mobile ) {\n\t grid-column: auto / span 1 !important;\n\t}\n }\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"digirisk-list-risk/style-index.css","mappings":";;;AAAA;;;;;EAAA;AASA;EACE;EACA;EACA;EACA;AAFF;;AAMG;EACA;AAHH;AAMC;EAIE;AAPH;AASG;EACD;EAEA;EACA;AARF;AAUE;EACE;AARJ;AAUI;EACC;AARL;AAWE;EACE;AATJ;AAWI;EACD;AATH;AAYE;EACE;EACA;AAVJ;AAYI;EACD;AAVH;AAaE;EACE;EACA;AAXJ;AAaI;EACD;AAXH;AAeE;EACE;EACA;EACA;EACA;AAbJ;AAeI;EACD;EACA;AAbH;AAgBE;EACE;EACA;AAdJ;AAgBE;EACE;EACA;AAdJ;AAgBE;EACE;EACA;EACA;EACA;EACA;AAdJ;AAgBE;EACE;EACA;AAdJ;;AAqBA;EACE;EACA;EACA;AAlBF;AAsBC;EACE;AApBH;AA0BE;EACE;AAxBJ;AAgBC;EACE;AAdH;AAoBE;EACE;AAlBJ;AAiBE;EACE;AAfJ;AAkBG;EAJD;IAKG;EAfH;AACF;AAEC;EACE;AAAH;AAME;EACE;AAJJ;AAGE;EACE;AADJ;AAIG;EAJD;IAKG;EADH;AACF;AALE;EACE;AAOJ;AAJG;EAJD;IAKG;EAOH;AACF;AApBC;EACE;AAsBH;AAhBE;EACE;AAkBJ;AAnBE;EACE;AAqBJ;AAlBG;EAJD;IAKG;EAqBH;AACF;AA3BE;EACE;AA6BJ;AA1BG;EAJD;IAKG;EA6BH;AACF;AAnCE;EACE;AAqCJ;AAlCG;EAJD;IAKG;EAqCH;AACF;AAlDC;EACE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;EA+LF;AACF;AAzMG;EACD;IACE;EA2MF;AACF;AAvMG;EACD;IACE;EAyMF;AACF;AAnNG;EACD;IACE;EAqNF;AACF;AAjNG;EACD;IACE;EAmNF;AACF;AA7MC;EADC;IAEC;EAgND;AACF,C","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/scss/style.scss"],"sourcesContent":["/**\r\n * The following styles get applied both on the front of your site\r\n * and in the editor.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n$media__mobile: 599px;\r\n\r\n:root {\r\n --eo-digirisk-list-risk-1: #ECECEC;\r\n --eo-digirisk-list-risk-2: #E9AD4F;\r\n --eo-digirisk-list-risk-3: #E05353;\r\n --eo-digirisk-list-risk-4: #313131;\r\n}\r\n\r\n.wp-block-eo-digirisk-list-risk {\r\n \t* {\r\n\t box-sizing: border-box;\r\n\t}\r\n\r\n\t.eo-digirisk-list-risk__list {\r\n\t //display: flex;\r\n\t //flex-wrap: wrap;\r\n\t //gap: 2em;\r\n\t width: 100%;\r\n\r\n\t .eo-digirisk-list-risk__element {\r\n\t\twidth: 100%;\r\n\t\t//min-width: 50%;\r\n\t\tpadding: 1em;\r\n\t\tborder-radius: 16px;\r\n\r\n\t\t&.--risk-1 {\r\n\t\t background: var(--eo-digirisk-list-risk-1);\r\n\r\n\t\t .eo-digirisk-list-risk__icon-risk {\r\n\t\t\t fill: #C3C3C3;\r\n\t\t }\r\n\t\t}\r\n\t\t&.--risk-2 {\r\n\t\t background: var(--eo-digirisk-list-risk-2);\r\n\r\n\t\t .eo-digirisk-list-risk__icon-risk {\r\n\t\t\tfill: #E57128;\r\n\t\t }\r\n\t\t}\r\n\t\t&.--risk-3 {\r\n\t\t background: var(--eo-digirisk-list-risk-3);\r\n\t\t color: #fff;\r\n\r\n\t\t .eo-digirisk-list-risk__icon-risk {\r\n\t\t\tfill: #C31D1D;\r\n\t\t }\r\n\t\t}\r\n\t\t&.--risk-4 {\r\n\t\t background: var(--eo-digirisk-list-risk-4);\r\n\t\t color: #fff;\r\n\r\n\t\t .eo-digirisk-list-risk__icon-risk {\r\n\t\t\tfill: #767676;\r\n\t\t }\r\n\t\t}\r\n\r\n\t\t.eo-digirisk-list-risk__content {\r\n\t\t display: flex;\r\n\t\t flex-wrap: wrap;\r\n\t\t gap: 1em;\r\n\t\t align-items: flex-end;\r\n\r\n\t\t .eo-digirisk-list-risk__content-label-group {\r\n\t\t\tmin-width: 50%;\r\n\t\t\tmax-width: 50%;\r\n\t\t }\r\n\t\t}\r\n\t\t.eo-digirisk-list-risk__icon-risk {\r\n\t\t fill: #fff;\r\n\t\t max-width: 20px;\r\n\t\t}\r\n\t\t.eo-digirisk-list-risk__content-label {\r\n\t\t text-transform: uppercase;\r\n\t\t font-size: 0.9em;\r\n\t\t}\r\n\t\t.eo-digirisk-list-risk__content-risk {\r\n\t\t font-size: 2.2em;\r\n\t\t font-weight: 900;\r\n\t\t text-align: right;\r\n\t\t flex-grow: 1;\r\n\t\t line-height: 1;\r\n\t\t}\r\n\t\t.eo-digirisk-list-risk__label {\r\n\t\t font-size: 1.2em;\r\n\t\t font-weight: 600;\r\n\t\t}\r\n\t }\r\n\t}\r\n}\r\n\r\n// @TODO A deplacer dans un framework interne au plugin\r\n.eo-grid {\r\n display: grid;\r\n grid-gap: 1em 1em;\r\n grid-template-columns: repeat( 4, 1fr );\r\n\r\n // Définition des tailles.\r\n @for $i from 1 through 6 {\r\n\t&.eo-grid__col-#{$i} {\r\n\t grid-template-columns: repeat( $i, 1fr );\r\n\t}\r\n\r\n\t// Chaque enfant peut modifier sa propre taille.\r\n\t@for $y from 1 through 6 {\r\n\t @if ( $y <= $i ) {\r\n\t\t&.eo-grid__col-#{$i} > .eo-grid__width-#{$y} {\r\n\t\t grid-column: auto / span $y;\r\n\r\n\t\t @if ( $y > 1 ) {\r\n\t\t\t@media ( max-width: 920px ) {\r\n\t\t\t grid-column: auto / span 2;\r\n\t\t\t}\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n }\r\n\r\n // Définition des hauteurs des enfants.\r\n @for $i from 1 through 6 {\r\n\t> .eo-grid__height-#{$i} {\r\n\t grid-row: auto / span $i;\r\n\r\n\t @media ( max-width: 920px ) {\r\n\t\tgrid-row: auto / span 1 !important;\r\n\t }\r\n\t}\r\n }\r\n\r\n // Marges.\r\n @for $i from 0 through 6 {\r\n\t&.eo-grid__margin-#{$i} {\r\n\t margin: #{$i}em 0;\r\n\t}\r\n }\r\n\r\n // Gouttières.\r\n @for $i from 0 through 6 {\r\n\t&.eo-grid__gap-#{$i} {\r\n\t grid-gap: #{$i}em #{$i}em;\r\n\t}\r\n }\r\n\r\n // Responsive.\r\n @for $i from 1 through 6 {\r\n\t@if ( $i > 2 ) {\r\n\t @media ( max-width: 920px ) {\r\n\t\t&.eo-grid__col-#{$i} {\r\n\t\t grid-template-columns: repeat( 2, 1fr ) !important;\r\n\t\t}\r\n\t }\r\n\t}\r\n\t@if ( $i > 1 ) {\r\n\t @media ( max-width: $media__mobile ) {\r\n\t\t&.eo-grid__col-#{$i} {\r\n\t\t grid-template-columns: repeat( 1, 1fr ) !important;\r\n\t\t}\r\n\t }\r\n\t}\r\n\r\n }\r\n > * {\r\n\t@media ( max-width: $media__mobile ) {\r\n\t grid-column: auto / span 1 !important;\r\n\t}\r\n }\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/digirisk-list-risk/view.asset.php b/blocks/build/digirisk-list-risk/view.asset.php index c67aa91..618298a 100644 --- a/blocks/build/digirisk-list-risk/view.asset.php +++ b/blocks/build/digirisk-list-risk/view.asset.php @@ -1 +1 @@ - array(), 'version' => 'e0953515627577a981b4'); + array(), 'version' => '0eeb955bbbb49f1fe943'); diff --git a/blocks/build/digirisk-list-risk/view.js.map b/blocks/build/digirisk-list-risk/view.js.map index 96a7ee8..989d6d2 100644 --- a/blocks/build/digirisk-list-risk/view.js.map +++ b/blocks/build/digirisk-list-risk/view.js.map @@ -1 +1 @@ -{"version":3,"file":"digirisk-list-risk/view.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n *\n * When this file is defined as the value of the `viewScript` property\n * in `block.json` it will be enqueued on the front end of the site.\n *\n * Example:\n *\n * ```js\n * {\n * \"viewScript\": \"file:./view.js\"\n * }\n * ```\n *\n * If you're not making any changes to this file because your project doesn't need any\n * JavaScript running in the front-end, then you should delete this file and remove\n * the `viewScript` property from `block.json`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\n */\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"digirisk-list-risk/view.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,G","sources":["webpack://eo-blocks/./blocks/src/digirisk-list-risk/view.js"],"sourcesContent":["/**\r\n * Use this file for JavaScript code that you want to run in the front-end\r\n * on posts/pages that contain this block.\r\n *\r\n * When this file is defined as the value of the `viewScript` property\r\n * in `block.json` it will be enqueued on the front end of the site.\r\n *\r\n * Example:\r\n *\r\n * ```js\r\n * {\r\n * \"viewScript\": \"file:./view.js\"\r\n * }\r\n * ```\r\n *\r\n * If you're not making any changes to this file because your project doesn't need any\r\n * JavaScript running in the front-end, then you should delete this file and remove\r\n * the `viewScript` property from `block.json`.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\r\n */\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/kpi-contentment/index.asset.php b/blocks/build/kpi-contentment/index.asset.php index f1e4084..619a363 100644 --- a/blocks/build/kpi-contentment/index.asset.php +++ b/blocks/build/kpi-contentment/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '54135be1069760bb3c59'); + array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => 'd147542f5806dc5a9530'); diff --git a/blocks/build/kpi-contentment/index.css.map b/blocks/build/kpi-contentment/index.css.map index cf18261..ef92649 100644 --- a/blocks/build/kpi-contentment/index.css.map +++ b/blocks/build/kpi-contentment/index.css.map @@ -1 +1 @@ -{"version":3,"file":"kpi-contentment/index.css","mappings":";;;AAAA;;;;EAAA,C","sources":["webpack://eo-blocks/./blocks/src/kpi-contentment/scss/editor.scss"],"sourcesContent":["/**\r\n * The following styles get applied inside the editor only.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n.wp-block-eo-blocks-kpi-contentment {\r\n}\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"kpi-contentment/index.css","mappings":";;;AAAA;;;;EAAA,C","sources":["webpack://eo-blocks/./blocks/src/kpi-contentment/scss/editor.scss"],"sourcesContent":["/**\n * The following styles get applied inside the editor only.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n.wp-block-eo-blocks-kpi-contentment {\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/kpi-contentment/index.js b/blocks/build/kpi-contentment/index.js index e1ee457..d1aaa2a 100644 --- a/blocks/build/kpi-contentment/index.js +++ b/blocks/build/kpi-contentment/index.js @@ -30,7 +30,7 @@ var SvgIconFrown = function SvgIconFrown(props) { }))); }; -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik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ks/build/kpi-contentment/index.js.map b/blocks/build/kpi-contentment/index.js.map index 074736a..a029134 100644 --- a/blocks/build/kpi-contentment/index.js.map +++ b/blocks/build/kpi-contentment/index.js.map @@ -1 +1 @@ -{"version":3,"file":"kpi-contentment/index.js","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA;AACA,GAAG;AACH;AAC0C;AAC1C,iEAAe,oBAAoB,gjEAAgjE;;;;;;;;;;;;;;;;;ACfnlE;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA;AACA,GAAG;AACH;AACwC;AACxC,iEAAe,oBAAoB,g5BAAg5B;;;;;;;;;;;;;;;;;ACfn7B;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA;AACA,GAAG;AACH;AAC0C;AAC1C,iEAAe,oBAAoB,gkEAAgkE;;;;;;;;;;;;;;;;;;;;;;;;;;;ACfnmE;AACA;AACA;AACA;AACA;AACqC;;AAErC;AACA;AACA;AACA;AACA;AACA;AAC2E;AACE;;AAE7E;AACA;AACA;AACA;AACA;AACA;AAC4B;;AAE5B;AACA;AACA;AACgE;AACA;AACJ;;AAG5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASS,IAAIA,CAAE;EAAEC,UAAU;EAAEC;AAAc,CAAC,EAAG;EAC7D,MAAM;IAAE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CAAgtC;EAACF,IAAI,EAAC;AAAS,CAAC,CACpuC,CACL;;AAED;AACA;AACA;AACA;AACA;AACAN,oEAAiB,CAAEC,6CAAa,EAAE;EACjC;AACD;AACA;EACCS,IAAI,EAAE9B,6CAAI;EACV+B,IAAI,EAAET;AACP,CAAE,CAAC;;;;;;;;;;;ACvCH;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://eo-blocks/./assets/images/icon-frown.svg","webpack://eo-blocks/./assets/images/icon-pin.svg","webpack://eo-blocks/./assets/images/icon-smile.svg","webpack://eo-blocks/./blocks/src/kpi-contentment/edit.js","webpack://eo-blocks/./blocks/src/kpi-contentment/index.js","webpack://eo-blocks/./blocks/src/kpi-contentment/scss/editor.scss","webpack://eo-blocks/./blocks/src/kpi-contentment/scss/style.scss","webpack://eo-blocks/external window \"React\"","webpack://eo-blocks/external window [\"wp\",\"blockEditor\"]","webpack://eo-blocks/external window [\"wp\",\"blocks\"]","webpack://eo-blocks/external window [\"wp\",\"components\"]","webpack://eo-blocks/external window [\"wp\",\"i18n\"]","webpack://eo-blocks/webpack/bootstrap","webpack://eo-blocks/webpack/runtime/chunk loaded","webpack://eo-blocks/webpack/runtime/compat get default export","webpack://eo-blocks/webpack/runtime/define property getters","webpack://eo-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://eo-blocks/webpack/runtime/make namespace object","webpack://eo-blocks/webpack/runtime/jsonp chunk loading","webpack://eo-blocks/webpack/before-startup","webpack://eo-blocks/webpack/startup","webpack://eo-blocks/webpack/after-startup"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgIconFrown = function SvgIconFrown(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FA5659\",\n d: \"M10 20a10 10 0 1 0 0-20 10 10 0 0 0 0 20m-3.777-4.816a.624.624 0 1 1-1.191-.371c.64-2.075 2.636-3.563 4.968-3.563s4.328 1.488 4.973 3.566a.626.626 0 0 1-.41.782.626.626 0 0 1-.782-.41c-.48-1.54-1.98-2.688-3.781-2.688-1.8 0-3.3 1.148-3.777 2.684M5.64 8.125a1.25 1.25 0 1 1 2.5 0 1.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TQgMTIuMjU2NyA3LjI0MTEyQzEyLjQ5MTIgNy4wMDY3IDEyLjgwOTEgNi44NzUgMTMuMTQwNiA2Ljg3NVoiIGZpbGw9IiNGQTU2NTkiLz4NCjwvc3ZnPg0K\";","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgIconPin = function SvgIconPin(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 32,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#1D1D1D\",\n d: \"M13.481 31.281C16.688 27.258 24 17.508 24 12.031 24 5.39 18.625 0 12 0S0 5.389 0 12.031c0 5.477 7.313 15.227 10.519 19.25a1.885 1.885 0 0 0 2.962 0M12 8.021c1.06 0 2.078.422 2.828 1.174a4.015 4.015 0 0 1 0 5.672 3.995 3.995 0 0 1-5.656 0 4.016 4.016 0 0 1 0-5.672A4 4 0 0 1 12 8.021\"\n })));\n};\nexport { SvgIconPin as ReactComponent };\nexport default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAyNCAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCjxwYXRoIGQ9Ik0xMy40ODEyIDMxLjI4MUMxNi42ODc1IDI3LjI1OCAyNCAxNy41MDc4IDI0IDEyLjAzMTFDMjQgNS4zODg5NSAxOC42MjUgMCAxMiAwQzUuMzc1IDAgMCA1LjM4ODk1IDAgMTIuMDMxMUMwIDE3LjUwNzggNy4zMTI1IDI3LjI1OCAxMC41MTg4IDMxLjI4MUMxMS4yODc1IDMyLjIzOTcgMTIuNzEyNSAzMi4yMzk3IDEzLjQ4MTIgMzEuMjgxWk0xMiA4LjAyMDc2QzEzLjA2MDkgOC4wMjA3NiAxNC4wNzgzIDguNDQzMjggMTQuODI4NCA5LjE5NTM3QzE1LjU3ODYgOS45NDc0NiAxNiAxMC45Njc1IDE2IDEyLjAzMTFDMTYgMTMuMDk0OCAxNS41Nzg2IDE0LjExNDggMTQuODI4NCAxNC44NjY5QzE0LjA3ODMgMTUuNjE5IDEzLjA2MDkgMTYuMDQxNSAxMiAxNi4wNDE1QzEwLjkzOTEgMTYuMDQxNSA5LjkyMTcyIDE1LjYxOSA5LjE3MTU3IDE0Ljg2NjlDOC40MjE0MyAxNC4xMTQ4IDggMTMuMDk0OCA4IDEyLjAzMTFDOCAxMC45Njc1IDguNDIxNDMgOS45NDc0NiA5LjE3MTU3IDkuMTk1MzdDOS45MjE3MiA4LjQ0MzI4IDEwLjkzOTEgOC4wMjA3NiAxMiA4LjAyMDc2WiIgZmlsbD0iIzFEMUQxRCIvPg0KPC9zdmc+DQo=\";","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgIconSmile = function SvgIconSmile(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#62B64D\",\n d: \"M10 20a10 10 0 1 0 0-20 10 10 0 0 0 0 20m-3.59-7.285c.7.808 1.895 1.66 3.59 1.66s2.89-.852 3.59-1.66a.625.625 0 1 1 .945.82c-.87 1-2.383 2.09-4.535 2.09s-3.664-1.09-4.535-2.09a.625.625 0 1 1 .945-.82m-.77-4.59a1.25 1.25 0 1 1 2.5 0 1.25 1.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IyMyA3LjQ3NTU0IDEyLjI1NjcgNy4yNDExMkMxMi40OTEyIDcuMDA2NyAxMi44MDkxIDYuODc1IDEzLjE0MDYgNi44NzVaIiBmaWxsPSIjNjJCNjREIi8+DQo8L3N2Zz4NCg==\";","/**\r\n * Retrieves the translation of text.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/\r\n */\r\nimport { __ } from '@wordpress/i18n';\r\n\r\n/**\r\n * React hook that is used to mark the block wrapper element.\r\n * It provides all the necessary props like the class name.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops\r\n */\r\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\r\nimport { PanelBody, TextControl, RangeControl } from '@wordpress/components';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * Those files can contain any CSS code that gets applied to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './scss/editor.scss';\r\n\r\n/**\r\n * Import components\r\n */\r\nimport iconFrown from './../../../assets/images/icon-frown.svg';\r\nimport iconSmile from './../../../assets/images/icon-smile.svg';\r\nimport iconPin from './../../../assets/images/icon-pin.svg';\r\n\r\n\r\n/**\r\n * The edit function describes the structure of your block in the context of the\r\n * editor. This represents what the editor will render when the block is used.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit\r\n *\r\n * @return {Element} Element to render.\r\n */\r\nexport default function Edit( { attributes, setAttributes } ) {\r\n\tconst { blockLabel, contentmentLabel } = attributes;\r\n\tconst customTooltipContent = value => `${value}%`\r\n\tlet contentmentLabelColorClass = 'bar__quater-1';\r\n\r\n\tif ( contentmentLabel < 25 ) {\r\n\t\tcontentmentLabelColorClass = 'bar__quarter-1';\r\n\t} else if ( contentmentLabel >= 25 && contentmentLabel < 50 ) {\r\n\t\tcontentmentLabelColorClass = 'bar__quarter-2';\r\n\t} else if ( contentmentLabel >= 50 && contentmentLabel < 75 ) {\r\n\t\tcontentmentLabelColorClass = 'bar__quarter-3';\r\n\t} else {\r\n\t\tcontentmentLabelColorClass = 'bar__quarter-4';\r\n\t}\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t setAttributes( { blockLabel: value } ) }\r\n\t\t\t\t\t/>\r\n\t\t\t\t\t setAttributes( { contentmentLabel: value } ) }\r\n\t\t\t\t\t\tmin={ 0 }\r\n\t\t\t\t\t\tmax={ 100 }\r\n\t\t\t\t\t\trenderTooltipContent={ customTooltipContent }\r\n\t\t\t\t\t/>\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t
\r\n\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\r\n\t\t\t\t\t\t
\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\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\t
\r\n\t\t\t\t\t\t
{ blockLabel }
\r\n\t\t\t\t\t\t
{ contentmentLabel }%
\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","/**\n * Registers a new block provided a unique name and an object defining its behavior.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * All files containing `style` keyword are bundled together. The code used\n * gets applied both to the front of your site and to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './scss/style.scss';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport metadata from './block.json';\n\nconst blockIcon = (\n\t\n\t\t\n\t\n);\n\n/**\n * Every block starts by registering a new block type definition.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nregisterBlockType( metadata.name, {\n\t/**\n\t * @see ./edit.js\n\t */\n\tedit: Edit,\n\ticon: blockIcon,\n} );\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\"][\"components\"];","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\"kpi-contentment/index\": 0,\n\t\"kpi-contentment/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[\"webpackChunkeo_blocks\"] = globalThis[\"webpackChunkeo_blocks\"] || [];\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, [\"kpi-contentment/style-index\"], () => (__webpack_require__(\"./blocks/src/kpi-contentment/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","InspectorControls","useBlockProps","PanelBody","TextControl","RangeControl","iconFrown","iconSmile","iconPin","Edit","attributes","setAttributes","blockLabel","contentmentLabel","customTooltipContent","value","contentmentLabelColorClass","createElement","Fragment","title","label","onChange","min","max","renderTooltipContent","className","src","style","left","registerBlockType","metadata","blockIcon","width","height","viewBox","fill","xmlns","d","name","edit","icon"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"kpi-contentment/index.js","mappings":";;;;;;;;;;;;;;;;;AAAA;AACA,sBAAsB,wEAAwE,gBAAgB,sBAAsB,OAAO,sBAAsB,oBAAoB,gDAAgD,WAAW;AACjN;AAC/B;AACA,sBAAsB,gDAAmB;AACzC;AACA;AACA;AACA;AACA,GAAG,yCAAyC,gDAAmB;AAC/D;AACA;AACA,GAAG;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ACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://eo-blocks/./assets/images/icon-frown.svg","webpack://eo-blocks/./assets/images/icon-pin.svg","webpack://eo-blocks/./assets/images/icon-smile.svg","webpack://eo-blocks/./blocks/src/kpi-contentment/edit.js","webpack://eo-blocks/./blocks/src/kpi-contentment/index.js","webpack://eo-blocks/./blocks/src/kpi-contentment/scss/editor.scss?d212","webpack://eo-blocks/./blocks/src/kpi-contentment/scss/style.scss?293e","webpack://eo-blocks/external window \"React\"","webpack://eo-blocks/external window [\"wp\",\"blockEditor\"]","webpack://eo-blocks/external window [\"wp\",\"blocks\"]","webpack://eo-blocks/external window [\"wp\",\"components\"]","webpack://eo-blocks/external window [\"wp\",\"i18n\"]","webpack://eo-blocks/webpack/bootstrap","webpack://eo-blocks/webpack/runtime/chunk loaded","webpack://eo-blocks/webpack/runtime/compat get default export","webpack://eo-blocks/webpack/runtime/define property getters","webpack://eo-blocks/webpack/runtime/hasOwnProperty shorthand","webpack://eo-blocks/webpack/runtime/make namespace object","webpack://eo-blocks/webpack/runtime/jsonp chunk loading","webpack://eo-blocks/webpack/before-startup","webpack://eo-blocks/webpack/startup","webpack://eo-blocks/webpack/after-startup"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgIconFrown = function SvgIconFrown(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#FA5659\",\n d: \"M10 20a10 10 0 1 0 0-20 10 10 0 0 0 0 20m-3.777-4.816a.624.624 0 1 1-1.191-.371c.64-2.075 2.636-3.563 4.968-3.563s4.328 1.488 4.973 3.566a.626.626 0 0 1-.41.782.626.626 0 0 1-.782-.41c-.48-1.54-1.98-2.688-3.781-2.688-1.8 0-3.3 1.148-3.777 2.684M5.64 8.125a1.25 1.25 0 1 1 2.5 0 1.25 1.25 0 0 1-2.5 0m7.5-1.25a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5\"\n })));\n};\nexport { SvgIconFrown as ReactComponent };\nexport default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDIwQzEyLjY1MjIgMjAgMTUuMTk1NyAxOC45NDY0IDE3LjA3MT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MTEyQzguMDA4OTMgNy40NzU1NCA4LjE0MDYyIDcuNzkzNDggOC4xNDA2MiA4LjEyNUM4LjE0MDYyIDguNDU2NTIgOC4wMDg5MyA4Ljc3NDQ2IDcuNzc0NTEgOS4wMDg4OEM3LjU0MDA5IDkuMjQzMyA3LjIyMjE1IDkuMzc1IDYuODkwNjIgOS4zNzVDNi41NTkxIDkuMzc1IDYuMjQxMTYgOS4yNDMzIDYuMDA2NzQgOS4wMDg4OEM1Ljc3MjMyIDguNzc0NDYgNS42NDA2MiA4LjQ1NjUyIDUuNjQwNjIgOC4xMjVaTTEzLjE0MDYgNi44NzVDMTMuNDcyMSA2Ljg3NSAxMy43OTAxIDcuMDA2NyAxNC4wMjQ1IDcuMjQxMTJDMTQuMjU4OSA3LjQ3NTU0IDE0LjM5MDYgNy43OTM0OCAxNC4zOTA2IDguMTI1QzE0LjM5MDYgOC40NTY1MiAxNC4yNTg5IDguNzc0NDYgMTQuMDI0NSA5LjAwODg4QzEzLjc5MDEgOS4yNDMzIDEzLjQ3MjEgOS4zNzUgMTMuMTQwNiA5LjM3NUMxMi44MDkxIDkuMzc1IDEyLjQ5MTIgOS4yNDMzIDEyLjI1NjcgOS4wMDg4OEMxMi4wMjIzIDguNzc0NDYgMTEuODkwNiA4LjQ1NjUyIDExLjg5MDYgOC4xMjVDMTEuODkwNiA3Ljc5MzQ4IDEyLjAyMjMgNy40NzU1NCAxMi4yNTY3IDcuMjQxMTJDMTIuNDkxMiA3LjAwNjcgMTIuODA5MSA2Ljg3NSAxMy4xNDA2IDYuODc1WiIgZmlsbD0iI0ZBNTY1OSIvPgo8L3N2Zz4K\";","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgIconPin = function SvgIconPin(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 32,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#1D1D1D\",\n d: \"M13.481 31.281C16.688 27.258 24 17.508 24 12.031 24 5.39 18.625 0 12 0S0 5.389 0 12.031c0 5.477 7.313 15.227 10.519 19.25a1.885 1.885 0 0 0 2.962 0M12 8.021c1.06 0 2.078.422 2.828 1.174a4.015 4.015 0 0 1 0 5.672 3.995 3.995 0 0 1-5.656 0 4.016 4.016 0 0 1 0-5.672A4 4 0 0 1 12 8.021\"\n })));\n};\nexport { SvgIconPin as ReactComponent };\nexport default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAyNCAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQ4MTIgMzEuMjgxQzE2LjY4NzUgMjcuMjU4IDI0IDE3LjUwNzggMjQgMTIuMDMxMUMyNCA1LjM4ODk1IDE4LjYyNSAwIDEyIDBDNS4zNzUgMCAwIDUuMzg4OTUgMCAxMi4wMzExQzAgMTcuNTA3OCA3LjMxMjUgMjcuMjU4IDEwLjUxODggMzEuMjgxQzExLjI4NzUgMzIuMjM5NyAxMi43MTI1IDMyLjIzOTcgMTMuNDgxMiAzMS4yODFaTTEyIDguMDIwNzZDMTMuMDYwOSA4LjAyMDc2IDE0LjA3ODMgOC40NDMyOCAxNC44Mjg0IDkuMTk1MzdDMTUuNTc4NiA5Ljk0NzQ2IDE2IDEwLjk2NzUgMTYgMTIuMDMxMUMxNiAxMy4wOTQ4IDE1LjU3ODYgMTQuMTE0OCAxNC44Mjg0IDE0Ljg2NjlDMTQuMDc4MyAxNS42MTkgMTMuMDYwOSAxNi4wNDE1IDEyIDE2LjA0MTVDMTAuOTM5MSAxNi4wNDE1IDkuOTIxNzIgMTUuNjE5IDkuMTcxNTcgMTQuODY2OUM4LjQyMTQzIDE0LjExNDggOCAxMy4wOTQ4IDggMTIuMDMxMUM4IDEwLjk2NzUgOC40MjE0MyA5Ljk0NzQ2IDkuMTcxNTcgOS4xOTUzN0M5LjkyMTcyIDguNDQzMjggMTAuOTM5MSA4LjAyMDc2IDEyIDguMDIwNzZaIiBmaWxsPSIjMUQxRDFEIi8+Cjwvc3ZnPgo=\";","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgIconSmile = function SvgIconSmile(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n fill: \"#62B64D\",\n d: \"M10 20a10 10 0 1 0 0-20 10 10 0 0 0 0 20m-3.59-7.285c.7.808 1.895 1.66 3.59 1.66s2.89-.852 3.59-1.66a.625.625 0 1 1 .945.82c-.87 1-2.383 2.09-4.535 2.09s-3.664-1.09-4.535-2.09a.625.625 0 1 1 .945-.82m-.77-4.59a1.25 1.25 0 1 1 2.5 0 1.25 1.25 0 0 1-2.5 0m7.5-1.25a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5\"\n })));\n};\nexport { SvgIconSmile as ReactComponent };\nexport default \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDIwQzEyLjY1MjIgMjAgMTUuMTk1NyAxOC45NDY0IDE3LjA3M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NTEgNy4yNDExMkM4LjAwODkzIDcuNDc1NTQgOC4xNDA2MiA3Ljc5MzQ4IDguMTQwNjIgOC4xMjVDOC4xNDA2MiA4LjQ1NjUyIDguMDA4OTMgOC43NzQ0NiA3Ljc3NDUxIDkuMDA4ODhDNy41NDAwOSA5LjI0MzMgNy4yMjIxNSA5LjM3NSA2Ljg5MDYyIDkuMzc1QzYuNTU5MSA5LjM3NSA2LjI0MTE2IDkuMjQzMyA2LjAwNjc0IDkuMDA4ODhDNS43NzIzMiA4Ljc3NDQ2IDUuNjQwNjIgOC40NTY1MiA1LjY0MDYyIDguMTI1Wk0xMy4xNDA2IDYuODc1QzEzLjQ3MjEgNi44NzUgMTMuNzkwMSA3LjAwNjcgMTQuMDI0NSA3LjI0MTEyQzE0LjI1ODkgNy40NzU1NCAxNC4zOTA2IDcuNzkzNDggMTQuMzkwNiA4LjEyNUMxNC4zOTA2IDguNDU2NTIgMTQuMjU4OSA4Ljc3NDQ2IDE0LjAyNDUgOS4wMDg4OEMxMy43OTAxIDkuMjQzMyAxMy40NzIxIDkuMzc1IDEzLjE0MDYgOS4zNzVDMTIuODA5MSA5LjM3NSAxMi40OTEyIDkuMjQzMyAxMi4yNTY3IDkuMDA4ODhDMTIuMDIyMyA4Ljc3NDQ2IDExLjg5MDYgOC40NTY1MiAxMS44OTA2IDguMTI1QzExLjg5MDYgNy43OTM0OCAxMi4wMjIzIDcuNDc1NTQgMTIuMjU2NyA3LjI0MTEyQzEyLjQ5MTIgNy4wMDY3IDEyLjgwOTEgNi44NzUgMTMuMTQwNiA2Ljg3NVoiIGZpbGw9IiM2MkI2NEQiLz4KPC9zdmc+Cg==\";","/**\n * Retrieves the translation of text.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * React hook that is used to mark the block wrapper element.\n * It provides all the necessary props like the class name.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-block-editor/#useblockprops\n */\nimport { InspectorControls, useBlockProps } from '@wordpress/block-editor';\nimport { PanelBody, TextControl, RangeControl } from '@wordpress/components';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * Those files can contain any CSS code that gets applied to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './scss/editor.scss';\n\n/**\n * Import components\n */\nimport iconFrown from './../../../assets/images/icon-frown.svg';\nimport iconSmile from './../../../assets/images/icon-smile.svg';\nimport iconPin from './../../../assets/images/icon-pin.svg';\n\n\n/**\n * The edit function describes the structure of your block in the context of the\n * editor. This represents what the editor will render when the block is used.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit\n *\n * @return {Element} Element to render.\n */\nexport default function Edit( { attributes, setAttributes } ) {\n\tconst { blockLabel, contentmentLabel } = attributes;\n\tconst customTooltipContent = value => `${value}%`\n\tlet contentmentLabelColorClass = 'bar__quater-1';\n\n\tif ( contentmentLabel < 25 ) {\n\t\tcontentmentLabelColorClass = 'bar__quarter-1';\n\t} else if ( contentmentLabel >= 25 && contentmentLabel < 50 ) {\n\t\tcontentmentLabelColorClass = 'bar__quarter-2';\n\t} else if ( contentmentLabel >= 50 && contentmentLabel < 75 ) {\n\t\tcontentmentLabelColorClass = 'bar__quarter-3';\n\t} else {\n\t\tcontentmentLabelColorClass = 'bar__quarter-4';\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t setAttributes( { blockLabel: value } ) }\n\t\t\t\t\t/>\n\t\t\t\t\t setAttributes( { contentmentLabel: value } ) }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\trenderTooltipContent={ customTooltipContent }\n\t\t\t\t\t/>\n\t\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
{ blockLabel }
\n\t\t\t\t\t\t
{ contentmentLabel }%
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t\n\t);\n}\n","/**\r\n * Registers a new block provided a unique name and an object defining its behavior.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nimport { registerBlockType } from '@wordpress/blocks';\r\n\r\n/**\r\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\r\n * All files containing `style` keyword are bundled together. The code used\r\n * gets applied both to the front of your site and to the editor.\r\n *\r\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\r\n */\r\nimport './scss/style.scss';\r\n\r\n/**\r\n * Internal dependencies\r\n */\r\nimport Edit from './edit';\r\nimport metadata from './block.json';\r\n\r\nconst blockIcon = (\r\n\t\r\n\t\t\r\n\t\r\n);\r\n\r\n/**\r\n * Every block starts by registering a new block type definition.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\r\n */\r\nregisterBlockType( metadata.name, {\r\n\t/**\r\n\t * @see ./edit.js\r\n\t */\r\n\tedit: Edit,\r\n\ticon: blockIcon,\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\"][\"components\"];","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\"kpi-contentment/index\": 0,\n\t\"kpi-contentment/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[\"webpackChunkeo_blocks\"] = globalThis[\"webpackChunkeo_blocks\"] || [];\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, [\"kpi-contentment/style-index\"], () => (__webpack_require__(\"./blocks/src/kpi-contentment/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","InspectorControls","useBlockProps","PanelBody","TextControl","RangeControl","iconFrown","iconSmile","iconPin","Edit","attributes","setAttributes","blockLabel","contentmentLabel","customTooltipContent","value","contentmentLabelColorClass","createElement","Fragment","title","label","onChange","min","max","renderTooltipContent","className","src","style","left","registerBlockType","metadata","blockIcon","width","height","viewBox","fill","xmlns","d","name","edit","icon"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/kpi-contentment/style-index.css.map b/blocks/build/kpi-contentment/style-index.css.map index 6a0b6e8..568d0dc 100644 --- a/blocks/build/kpi-contentment/style-index.css.map +++ b/blocks/build/kpi-contentment/style-index.css.map @@ -1 +1 @@ -{"version":3,"file":"kpi-contentment/style-index.css","mappings":";;;AAAA;;;;;EAAA;AASA;EACC;EACA;EACA;EACA;AAFD;;AAKA;EAME;EACA;AAPF;AAEE;EACD;AAAD;AAME;EACD;EACA;EACA;AAJD;AAME;EACD;AAJD;AAME;EACD;AAJD;AAOE;EACC;EACF;EACE;EACF;AALD;AAQE;EACD;AAND;AAQC;EACE;EACA;EACA;AANH;AASE;EACD;EACA;EACA;EACA;EACA;EACA;AAPD;AASC;EACE;EACA;AAPH;AASG;EACD;AAPF;AASG;EACD;AAPF;AASG;EACD;AAPF;AASG;EACD;AAPF;AAYE;EACD;EACA;EACA;EACA;AAVD;AAYC;EACE;AAVH;AAYC;EACE;EACA;AAVH;AAYG;EACD;AAVF;AAYG;EACD;AAVF;AAYG;EACD;AAVF;AAYG;EACD;AAVF,C","sources":["webpack://eo-blocks/./blocks/src/kpi-contentment/scss/style.scss"],"sourcesContent":["/**\r\n * The following styles get applied both on the front of your site\r\n * and in the editor.\r\n *\r\n * Replace them with your own styles or remove the file completely.\r\n */\r\n\r\n$media__mobile: 599px;\r\n\r\n:root {\r\n\t--eo-kpi-contentment-quarter-1: #FA5659;\r\n\t--eo-kpi-contentment-quarter-2: #F7A34A;\r\n\t--eo-kpi-contentment-quarter-3: #F8D042;\r\n\t--eo-kpi-contentment-quarter-4: #62B64D;\r\n}\r\n\r\n.wp-block-eo-kpi-contentment {\r\n\r\n * {\r\n\tbox-sizing: border-box;\r\n }\r\n\r\n display: block;\r\n position: relative;\r\n\r\n .eo-kpi-contentment__icon-frown, .eo-kpi-contentment__icon-smile {\r\n\tposition: absolute;\r\n\ttop: -5px;\r\n\twidth: 30px;\r\n }\r\n .eo-kpi-contentment__icon-frown {\r\n\tleft: 0;\r\n }\r\n .eo-kpi-contentment__icon-smile {\r\n\tright: 0;\r\n }\r\n\r\n .eo-kpi-contentment__container {\r\n \tdisplay: block;\r\n\twidth: 100%;\r\n \tpadding-left: 50px;\r\n\tpadding-right: 50px;\r\n }\r\n\r\n .eo-kpi-contentment__bar-container {\r\n\tposition: relative;\r\n\r\n\t.eo-kpi-contentment__icon-pin {\r\n\t position: absolute;\r\n\t bottom: 8px;\r\n\t transform: translate(-50%);\r\n\t}\r\n }\r\n .eo-kpi-contentment__bar {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tflex-wrap: nowrap;\r\n\tgap: 0;\r\n\tborder-radius: 4px;\r\n\toverflow: hidden;\r\n\r\n\t.eo-kpi-contentment__bar-quarter {\r\n\t width: 25%;\r\n\t height: 20px;\r\n\r\n\t &.bar__1 {\r\n\t\tbackground: var(--eo-kpi-contentment-quarter-1);\r\n\t }\r\n\t &.bar__2 {\r\n\t\tbackground: var(--eo-kpi-contentment-quarter-2);\r\n\t }\r\n\t &.bar__3 {\r\n\t\tbackground: var(--eo-kpi-contentment-quarter-3);\r\n\t }\r\n\t &.bar__4 {\r\n\t\tbackground: var(--eo-kpi-contentment-quarter-4);\r\n\t }\r\n\t}\r\n }\r\n\r\n .eo-kpi-contentment__content {\r\n\tdisplay: flex;\r\n\tflex-direction: row;\r\n\tflex-wrap: wrap;\r\n\tjustify-content: space-between;\r\n\r\n\t.eo-kpi-contentment__block-label {\r\n\t font-weight: 508;\r\n\t}\r\n\t.eo-kpi-contentment__block-contentment {\r\n\t color: #62B64D;\r\n\t font-weight: 700;\r\n\r\n\t &.bar__quarter-1 {\r\n\t\tcolor: var(--eo-kpi-contentment-quarter-1);\r\n\t }\r\n\t &.bar__quarter-2 {\r\n\t\tcolor: var(--eo-kpi-contentment-quarter-2);\r\n\t }\r\n\t &.bar__quarter-3 {\r\n\t\tcolor: var(--eo-kpi-contentment-quarter-3);\r\n\t }\r\n\t &.bar__quarter-4 {\r\n\t\tcolor: var(--eo-kpi-contentment-quarter-4);\r\n\t }\r\n\t}\r\n }\r\n}\r\n\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"kpi-contentment/style-index.css","mappings":";;;AAAA;;;;;EAAA;AASA;EACC;EACA;EACA;EACA;AAFD;;AAKA;EAME;EACA;AAPF;AAEE;EACD;AAAD;AAME;EACD;EACA;EACA;AAJD;AAME;EACD;AAJD;AAME;EACD;AAJD;AAOE;EACC;EACF;EACE;EACF;AALD;AAQE;EACD;AAND;AAQC;EACE;EACA;EACA;AANH;AASE;EACD;EACA;EACA;EACA;EACA;EACA;AAPD;AASC;EACE;EACA;AAPH;AASG;EACD;AAPF;AASG;EACD;AAPF;AASG;EACD;AAPF;AASG;EACD;AAPF;AAYE;EACD;EACA;EACA;EACA;AAVD;AAYC;EACE;AAVH;AAYC;EACE;EACA;AAVH;AAYG;EACD;AAVF;AAYG;EACD;AAVF;AAYG;EACD;AAVF;AAYG;EACD;AAVF,C","sources":["webpack://eo-blocks/./blocks/src/kpi-contentment/scss/style.scss"],"sourcesContent":["/**\n * The following styles get applied both on the front of your site\n * and in the editor.\n *\n * Replace them with your own styles or remove the file completely.\n */\n\n$media__mobile: 599px;\n\n:root {\n\t--eo-kpi-contentment-quarter-1: #FA5659;\n\t--eo-kpi-contentment-quarter-2: #F7A34A;\n\t--eo-kpi-contentment-quarter-3: #F8D042;\n\t--eo-kpi-contentment-quarter-4: #62B64D;\n}\n\n.wp-block-eo-kpi-contentment {\n\n * {\n\tbox-sizing: border-box;\n }\n\n display: block;\n position: relative;\n\n .eo-kpi-contentment__icon-frown, .eo-kpi-contentment__icon-smile {\n\tposition: absolute;\n\ttop: -5px;\n\twidth: 30px;\n }\n .eo-kpi-contentment__icon-frown {\n\tleft: 0;\n }\n .eo-kpi-contentment__icon-smile {\n\tright: 0;\n }\n\n .eo-kpi-contentment__container {\n \tdisplay: block;\n\twidth: 100%;\n \tpadding-left: 50px;\n\tpadding-right: 50px;\n }\n\n .eo-kpi-contentment__bar-container {\n\tposition: relative;\n\n\t.eo-kpi-contentment__icon-pin {\n\t position: absolute;\n\t bottom: 8px;\n\t transform: translate(-50%);\n\t}\n }\n .eo-kpi-contentment__bar {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tgap: 0;\n\tborder-radius: 4px;\n\toverflow: hidden;\n\n\t.eo-kpi-contentment__bar-quarter {\n\t width: 25%;\n\t height: 20px;\n\n\t &.bar__1 {\n\t\tbackground: var(--eo-kpi-contentment-quarter-1);\n\t }\n\t &.bar__2 {\n\t\tbackground: var(--eo-kpi-contentment-quarter-2);\n\t }\n\t &.bar__3 {\n\t\tbackground: var(--eo-kpi-contentment-quarter-3);\n\t }\n\t &.bar__4 {\n\t\tbackground: var(--eo-kpi-contentment-quarter-4);\n\t }\n\t}\n }\n\n .eo-kpi-contentment__content {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n\tjustify-content: space-between;\n\n\t.eo-kpi-contentment__block-label {\n\t font-weight: 508;\n\t}\n\t.eo-kpi-contentment__block-contentment {\n\t color: #62B64D;\n\t font-weight: 700;\n\n\t &.bar__quarter-1 {\n\t\tcolor: var(--eo-kpi-contentment-quarter-1);\n\t }\n\t &.bar__quarter-2 {\n\t\tcolor: var(--eo-kpi-contentment-quarter-2);\n\t }\n\t &.bar__quarter-3 {\n\t\tcolor: var(--eo-kpi-contentment-quarter-3);\n\t }\n\t &.bar__quarter-4 {\n\t\tcolor: var(--eo-kpi-contentment-quarter-4);\n\t }\n\t}\n }\n}\n\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/build/kpi-contentment/view.asset.php b/blocks/build/kpi-contentment/view.asset.php index 2dcf291..4ba8e1a 100644 --- a/blocks/build/kpi-contentment/view.asset.php +++ b/blocks/build/kpi-contentment/view.asset.php @@ -1 +1 @@ - array(), 'version' => '1013d32c093e3bb4301d'); + array(), 'version' => '411560ab0eccfb6692d2'); diff --git a/blocks/build/kpi-contentment/view.js.map b/blocks/build/kpi-contentment/view.js.map index 7f0853f..cc6dc80 100644 --- a/blocks/build/kpi-contentment/view.js.map +++ b/blocks/build/kpi-contentment/view.js.map @@ -1 +1 @@ -{"version":3,"file":"kpi-contentment/view.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACAA,OAAO,CAACC,GAAG,CAAC,qDAAqD,CAAC;AAClE,8B","sources":["webpack://eo-blocks/./blocks/src/kpi-contentment/view.js"],"sourcesContent":["/**\r\n * Use this file for JavaScript code that you want to run in the front-end\r\n * on posts/pages that contain this block.\r\n *\r\n * When this file is defined as the value of the `viewScript` property\r\n * in `block.json` it will be enqueued on the front end of the site.\r\n *\r\n * Example:\r\n *\r\n * ```js\r\n * {\r\n * \"viewScript\": \"file:./view.js\"\r\n * }\r\n * ```\r\n *\r\n * If you're not making any changes to this file because your project doesn't need any\r\n * JavaScript running in the front-end, then you should delete this file and remove\r\n * the `viewScript` property from `block.json`.\r\n *\r\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\r\n */\r\n\r\n/* eslint-disable no-console */\r\nconsole.log(\"Hello World! (from eo-blocks-kpi-contentment block)\");\r\n/* eslint-enable no-console */\r\n"],"names":["console","log"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"kpi-contentment/view.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACAA,OAAO,CAACC,GAAG,CAAC,qDAAqD,CAAC;AAClE,8B","sources":["webpack://eo-blocks/./blocks/src/kpi-contentment/view.js"],"sourcesContent":["/**\n * Use this file for JavaScript code that you want to run in the front-end\n * on posts/pages that contain this block.\n *\n * When this file is defined as the value of the `viewScript` property\n * in `block.json` it will be enqueued on the front end of the site.\n *\n * Example:\n *\n * ```js\n * {\n * \"viewScript\": \"file:./view.js\"\n * }\n * ```\n *\n * If you're not making any changes to this file because your project doesn't need any\n * JavaScript running in the front-end, then you should delete this file and remove\n * the `viewScript` property from `block.json`.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#view-script\n */\n\n/* eslint-disable no-console */\nconsole.log(\"Hello World! (from eo-blocks-kpi-contentment block)\");\n/* eslint-enable no-console */\n"],"names":["console","log"],"sourceRoot":""} \ No newline at end of file diff --git a/blocks/src/digirisk-list-risk/edit.js b/blocks/src/digirisk-list-risk/edit.js index ea8fc74..315a50c 100644 --- a/blocks/src/digirisk-list-risk/edit.js +++ b/blocks/src/digirisk-list-risk/edit.js @@ -14,7 +14,7 @@ import { __ } from '@wordpress/i18n'; import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; import { PanelBody, RangeControl, ToggleControl } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; -import { useEffect, useState } from 'react'; +import { digiriskApiGet } from './../../../assets/js/utils'; /** @@ -35,65 +35,12 @@ import './scss/editor.scss'; */ export default function Edit( { attributes, setAttributes } ) { const { blockGrid, displayRisk1, displayRisk2, displayRisk3, displayRisk4 } = attributes; - const [data, setData] = useState([]); - const [error, setError] = useState([]); const blockProps = useBlockProps(); const customTooltipContent = value => `${value}`; const routeApi = 'digiriskdolibarr/risk/getRisksByCotation'; const eoblocksSettings = useSelect( ( select ) => select( 'core' ).getSite()?.eoblocks_settings ); - - // @TODO: Isoler la fonction API dans un helper. - // Clean URL. - const cleanUrl = (url) => { - let cleanedUrl = url.replace(/:\//g, '://'); - cleanedUrl = cleanedUrl.replace(/([^:]\/)\/+/g, '$1'); - cleanedUrl = cleanedUrl.replace(/^\/+|\/+$/g, ''); - return cleanedUrl; - }; - - useEffect(() => { - const fetchData = async () => { - if (!eoblocksSettings) { - return; - } - const { eoblocks_dolibarr_url: baseUrlApi, eoblocks_dolibarr_api_key: apiKey } = eoblocksSettings; - if (!baseUrlApi || !apiKey || !routeApi) { - setError('Missing API key or base URL or route'); - return; - } - - let digiriskUrlApi = `${baseUrlApi}/api/index.php/${routeApi}?DOLAPIKEY=${apiKey}`; - digiriskUrlApi = cleanUrl(digiriskUrlApi); - - try { - const response = await fetch(digiriskUrlApi); - - if (!response.ok) { - if (response.status === 401) { - setError('Unauthorized: Wrong API Key or Unauthorized'); - } else if (response.status === 404) { - setError('Not Found: Wrong Dolibarr URL'); - } else { - setError(`Error: ${response.status}`); - } - return; - } - - const data = await response.json(); - - if (data.error) { - setError('Error in API response'); - return; - } - - setData(data); - } catch (err) { - setError(err.message); - } - }; - fetchData(); - }, [eoblocksSettings, routeApi]); + const { data, error } = digiriskApiGet(routeApi, eoblocksSettings); if (error) { console.log('Error:' + error);