From dbe74e5aa2f9ac82015ef9734b6c00a70c55f1fa Mon Sep 17 00:00:00 2001 From: Chrillaz Date: Thu, 29 Oct 2020 16:14:47 +0100 Subject: [PATCH] restructuring of filters --- build/accordion.js | 291 +++++- build/accordion.js.map | 1 + build/index.asset.php | 2 +- build/index.css | 192 +++- build/index.css.map | 2 +- build/index.js | 1618 +++++++++++++++++++++++++++++++- build/index.js.map | 1 + build/style-index.css | 195 +++- build/style-index.css.map | 2 +- src/components/controls.js | 17 + src/core-blocks/core-button.js | 123 --- src/core-blocks/core-column.js | 54 -- src/filters/attributes.js | 41 + src/filters/blockEdit.js | 140 +++ src/filters/extraProps.js | 9 + src/filters/index.js | 11 + src/index.js | 103 +- 17 files changed, 2518 insertions(+), 284 deletions(-) create mode 100644 build/accordion.js.map create mode 100644 build/index.js.map create mode 100644 src/components/controls.js delete mode 100644 src/core-blocks/core-button.js delete mode 100644 src/core-blocks/core-column.js create mode 100644 src/filters/attributes.js create mode 100644 src/filters/blockEdit.js create mode 100644 src/filters/extraProps.js create mode 100644 src/filters/index.js diff --git a/build/accordion.js b/build/accordion.js index 4348c8c..90308b5 100644 --- a/build/accordion.js +++ b/build/accordion.js @@ -1 +1,290 @@ -!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=24)}([,,,,,,function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} + +module.exports = _arrayLikeToArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); + +function _arrayWithoutHoles(arr) { + if (Array.isArray(arr)) return arrayLikeToArray(arr); +} + +module.exports = _arrayWithoutHoles; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _iterableToArray(iter) { + if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); +} + +module.exports = _iterableToArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableSpread; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js": +/*!******************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***! + \******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); + +var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js"); + +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); + +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js"); + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} + +module.exports = _toConsumableArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": +/*!***************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} + +module.exports = _unsupportedIterableToArray; + +/***/ }), + +/***/ "./src/blocks/accordion/assets/accordion.js": +/*!**************************************************!*\ + !*** ./src/blocks/accordion/assets/accordion.js ***! + \**************************************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"); +/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _components_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../components/helpers */ "./src/components/helpers.js"); + + + +var animate = function animate(args) { + var start = args.start, + element = args.element, + maxheight = args.maxheight, + duration = args.duration, + state = args.state; + var runtime = new Date().getTime() - start, + progress = runtime / duration, + currHeight = state ? maxheight - maxheight * Math.min(progress, 1) : maxheight * Math.min(progress, 1); + element.style.height = "".concat(currHeight.toFixed(2), "px"); + + if (runtime < duration) { + requestAnimationFrame(function () { + return animate(args); + }); + } +}; + +function requestAnimation() { + var duration = 250, + start = new Date().getTime(), + element = this.nextElementSibling, + maxheight = element.scrollHeight, + state = maxheight === element.offsetHeight; + this.querySelectorAll('.dashicons').forEach(function (icon) { + return Object(_components_helpers__WEBPACK_IMPORTED_MODULE_1__["toggle"])(icon, 'data-state', ['false', 'true']); + }); + return requestAnimationFrame(function () { + return animate({ + start: start, + element: element, + maxheight: maxheight, + duration: duration, + state: state + }); + }); +} + +Object(_components_helpers__WEBPACK_IMPORTED_MODULE_1__["domLoaded"])(function () { + var accordions = document.querySelectorAll('.noor-block-accordion'); + + _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(accordions).forEach(function (accordion) { + return accordion.addEventListener('click', requestAnimation, true); + }); +}); + +/***/ }), + +/***/ "./src/components/helpers.js": +/*!***********************************!*\ + !*** ./src/components/helpers.js ***! + \***********************************/ +/*! exports provided: domLoaded, toggle */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "domLoaded", function() { return domLoaded; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggle", function() { return toggle; }); +function domLoaded(callback) { + if (document.readyState === 'complete') { + callback(document.readyState === 'complete'); + } else { + window.addEventListener('DOMContentLoaded', callback(true)); + } +} +var toggle = function toggle(el, attribute, values) { + return el.setAttribute(attribute, el.getAttribute(attribute) === values[0] ? values[1] : values[0]); +}; + +/***/ }) + +/******/ }); +//# sourceMappingURL=accordion.js.map \ No newline at end of file diff --git a/build/accordion.js.map b/build/accordion.js.map new file mode 100644 index 0000000..6b292f1 --- /dev/null +++ b/build/accordion.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./src/blocks/accordion/assets/accordion.js","webpack:///./src/components/helpers.js"],"names":["animate","args","start","element","maxheight","duration","state","runtime","Date","getTime","progress","currHeight","Math","min","style","height","toFixed","requestAnimationFrame","requestAnimation","nextElementSibling","scrollHeight","offsetHeight","querySelectorAll","forEach","icon","toggle","domLoaded","accordions","document","accordion","addEventListener","callback","readyState","window","el","attribute","values","setAttribute","getAttribute"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;Q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WAAIA,SAAS,CAACC,gBAAV,CAA4B,OAA5B,EAAqCZ,gBAArC,EAAuD,IAAvD,CAAJ;AAAA,GAAlC;AACD,CALQ,CAAT,C;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAO,SAASQ,SAAT,CAAoBK,QAApB,EAA+B;AACpC,MAAKH,QAAQ,CAACI,UAAT,KAAwB,UAA7B,EAA0C;AAExCD,YAAQ,CAACH,QAAQ,CAACI,UAAT,KAAwB,UAAzB,CAAR;AACD,GAHD,MAGO;AAELC,UAAM,CAACH,gBAAP,CAAyB,kBAAzB,EAA6CC,QAAQ,CAAC,IAAD,CAArD;AACD;AACF;AAEM,IAAMN,MAAM,GAAG,SAATA,MAAS,CAAES,EAAF,EAAMC,SAAN,EAAiBC,MAAjB;AAAA,SAA6BF,EAAE,CAACG,YAAH,CAAiBF,SAAjB,EAA4BD,EAAE,CAACI,YAAH,CAAiBH,SAAjB,MAAiCC,MAAM,CAAC,CAAD,CAAvC,GAA6CA,MAAM,CAAC,CAAD,CAAnD,GAAyDA,MAAM,CAAC,CAAD,CAA3F,CAA7B;AAAA,CAAf,C","file":"accordion.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/blocks/accordion/assets/accordion.js\");\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","import { domLoaded, toggle } from '../../../components/helpers'\r\n\r\nconst animate = args => {\r\n\r\n const { start, element, maxheight, duration, state } = args;\r\n\r\n const runtime = new Date().getTime() - start,\r\n progress = runtime / duration,\r\n currHeight = state \r\n ? maxheight - (maxheight * Math.min( progress, 1))\r\n : (maxheight * Math.min( progress, 1 ));\r\n\r\n element.style.height = `${currHeight.toFixed(2)}px`;\r\n\r\n if ( runtime < duration ) {\r\n\r\n requestAnimationFrame( () => animate( args ) );\r\n }\r\n}\r\n\r\nfunction requestAnimation () {\r\n\r\n const duration = 250,\r\n start = new Date().getTime(),\r\n element = this.nextElementSibling,\r\n maxheight = element.scrollHeight,\r\n state = maxheight === element.offsetHeight;\r\n\r\n this.querySelectorAll('.dashicons').forEach(icon => toggle( icon, 'data-state', ['false', 'true'] ) );\r\n\r\n return requestAnimationFrame(() => animate( { start, element, maxheight, duration, state } ));\r\n}\r\n\r\ndomLoaded( () => {\r\n \r\n const accordions = document.querySelectorAll('.noor-block-accordion');\r\n \r\n [...accordions].forEach( accordion => accordion.addEventListener( 'click', requestAnimation, true ) );\r\n})","export function domLoaded( callback ) {\r\n if ( document.readyState === 'complete' ) {\r\n\r\n callback(document.readyState === 'complete');\r\n } else {\r\n\r\n window.addEventListener( 'DOMContentLoaded', callback(true));\r\n }\r\n}\r\n\r\nexport const toggle = ( el, attribute, values ) => el.setAttribute( attribute, el.getAttribute( attribute ) === values[0] ? values[1] : values[0] );"],"sourceRoot":""} \ No newline at end of file diff --git a/build/index.asset.php b/build/index.asset.php index e7a6c69..d602809 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '5864c2db1ff2d5760679b23e22a3bfb6'), 'accordion.js' => array('dependencies' => array('wp-polyfill'), 'version' => '954a5ccf99e04153addabfadf70be9cd')); \ No newline at end of file + array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '3b7bb90439c8aad98e7045809f3ab104'), 'accordion.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd70ba6744a311af1221964a05b6822fc')); \ No newline at end of file diff --git a/build/index.css b/build/index.css index 07fe663..f79ccfd 100644 --- a/build/index.css +++ b/build/index.css @@ -1,2 +1,190 @@ -.has-icon-arrow-right-alt .wp-block-button__link:after,.has-icon-arrow-right-alt .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt:hover .wp-block-button__link:after{right:-6px}.has-icon-arrow-right-alt2 .wp-block-button__link:after,.has-icon-arrow-right-alt2 .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt2:hover .wp-block-button__link:after{right:-6px}.has-icon-arrow-left-alt .wp-block-button__link:after,.has-icon-arrow-left-alt .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt:hover .wp-block-button__link:after{right:-6px}.has-icon-arrow-left-alt2 .wp-block-button__link:after,.has-icon-arrow-left-alt2 .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt2:hover .wp-block-button__link:after{right:-6px}.has-icon-clock .wp-block-button__link:after,.has-icon-clock .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-clock.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-clock.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-clock:hover .wp-block-button__link:after{right:-6px}.has-icon-location .wp-block-button__link:after,.has-icon-location .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-location.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-location.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-location:hover .wp-block-button__link:after{right:-6px}.noor-block-bullet-point{display:flex;width:100%}.noor-block-bullet-point.has-align-center{justify-content:center}.noor-block-bullet-point.has-align-right{justify-content:flex-end}.noor-block-bullet-point.has-align-left{justify-content:flex-start}.noor-block-bullet-point__point{display:flex;flex-direction:column;justify-content:center;align-items:center;width:87px;height:87px;border-radius:50%;overflow:hidden}.noor-block-bullet-point__text-content{margin:0!important}.noor-block-google-map{position:relative;height:0;overflow:hidden}.noor-block-google-map iframe{position:absolute;top:0;left:0;width:100%!important;height:100%!important;border:0!important}.noor-block-accordion__content{display:none;height:auto;max-height:100%}.noor-block-accordion[aria-expanded=true]+.noor-block-accordion__content{display:block}.components-responsive-wrapper__content{width:auto} -/*# sourceMappingURL=index.css.map */ \ No newline at end of file +@charset "UTF-8"; +/** + * The following styles get applied inside the editor only. + * + * Replace them with your own styles or remove the file completely. + */ +.has-icon-arrow-right-alt .wp-block-button__link::before, +.has-icon-arrow-right-alt .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-right-alt:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-arrow-right-alt2 .wp-block-button__link::before, +.has-icon-arrow-right-alt2 .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-right-alt2:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-arrow-left-alt .wp-block-button__link::before, +.has-icon-arrow-left-alt .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-left-alt:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-arrow-left-alt2 .wp-block-button__link::before, +.has-icon-arrow-left-alt2 .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-left-alt2:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-clock .wp-block-button__link::before, +.has-icon-clock .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-clock.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-clock.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-clock:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-location .wp-block-button__link::before, +.has-icon-location .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-location.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-location.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-location:hover .wp-block-button__link::after { + right: -6px; } + +.noor-block-bullet-point { + display: flex; + width: 100%; } + .noor-block-bullet-point.has-align-center { + justify-content: center; } + .noor-block-bullet-point.has-align-right { + justify-content: flex-end; } + .noor-block-bullet-point.has-align-left { + justify-content: flex-start; } + .noor-block-bullet-point__point { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 87px; + height: 87px; + border-radius: 50%; + overflow: hidden; } + .noor-block-bullet-point__text-content { + margin: 0 !important; } + +.noor-block-google-map { + position: relative; + height: 0; + overflow: hidden; } + .noor-block-google-map iframe { + position: absolute; + top: 0; + left: 0; + width: 100% !important; + height: 100% !important; + border: 0 !important; } + +.noor-block-accordion__content { + display: none; + height: auto; + max-height: 100%; } + +.noor-block-accordion[aria-expanded="true"] + .noor-block-accordion__content { + display: block; } + +.components-responsive-wrapper__content { + width: auto; } + + +/*# sourceMappingURL=index.css.map*/ \ No newline at end of file diff --git a/build/index.css.map b/build/index.css.map index 345196f..9ee3c5d 100644 --- a/build/index.css.map +++ b/build/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["css ./node_modules/css-loader/dist/cjs.js??ref--7-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./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AAA,CAAY,iBAAA,CAAkB,+DAAgE,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,sDAAuD,UAAA,CAAW,yBAAyB,YAAA,CAAa,UAAA,CAAW,0CAA0C,sBAAA,CAAuB,yCAAyC,wBAAA,CAAyB,wCAAwC,0BAAA,CAA2B,gCAAgC,YAAA,CAAa,qBAAA,CAAsB,sBAAA,CAAuB,kBAAA,CAAmB,UAAA,CAAW,WAAA,CAAY,iBAAA,CAAkB,eAAA,CAAgB,uCAAuC,kBAAA,CAAoB,uBAAuB,iBAAA,CAAkB,QAAA,CAAS,eAAA,CAAgB,8BAA8B,iBAAA,CAAkB,KAAA,CAAM,MAAA,CAAO,oBAAA,CAAsB,qBAAA,CAAuB,kBAAA,CAAoB,+BAA+B,YAAA,CAAa,WAAA,CAAY,eAAA,CAAgB,yEAA2E,aAAA,CAAc,wCAAwC,UAAA","file":"index.css","sourcesContent":[".has-icon-arrow-right-alt .wp-block-button__link::before,.has-icon-arrow-right-alt .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt:hover .wp-block-button__link::after{right:-6px}.has-icon-arrow-right-alt2 .wp-block-button__link::before,.has-icon-arrow-right-alt2 .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt2:hover .wp-block-button__link::after{right:-6px}.has-icon-arrow-left-alt .wp-block-button__link::before,.has-icon-arrow-left-alt .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt:hover .wp-block-button__link::after{right:-6px}.has-icon-arrow-left-alt2 .wp-block-button__link::before,.has-icon-arrow-left-alt2 .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt2:hover .wp-block-button__link::after{right:-6px}.has-icon-clock .wp-block-button__link::before,.has-icon-clock .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-clock.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-clock.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-clock:hover .wp-block-button__link::after{right:-6px}.has-icon-location .wp-block-button__link::before,.has-icon-location .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-location.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-location.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-location:hover .wp-block-button__link::after{right:-6px}.noor-block-bullet-point{display:flex;width:100%}.noor-block-bullet-point.has-align-center{justify-content:center}.noor-block-bullet-point.has-align-right{justify-content:flex-end}.noor-block-bullet-point.has-align-left{justify-content:flex-start}.noor-block-bullet-point__point{display:flex;flex-direction:column;justify-content:center;align-items:center;width:87px;height:87px;border-radius:50%;overflow:hidden}.noor-block-bullet-point__text-content{margin:0 !important}.noor-block-google-map{position:relative;height:0;overflow:hidden}.noor-block-google-map iframe{position:absolute;top:0;left:0;width:100% !important;height:100% !important;border:0 !important}.noor-block-accordion__content{display:none;height:auto;max-height:100%}.noor-block-accordion[aria-expanded=\"true\"]+.noor-block-accordion__content{display:block}.components-responsive-wrapper__content{width:auto}\n"]} \ No newline at end of file +{"version":3,"sources":["webpack:///editor.scss"],"names":[],"mappings":"AAAA,gBAAgB;AAChB;;;;EAIE;AACF;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;EACE,aAAa;EACb,WAAW,EAAE;EACb;IACE,uBAAuB,EAAE;EAC3B;IACE,yBAAyB,EAAE;EAC7B;IACE,2BAA2B,EAAE;EAC/B;IACE,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,mBAAmB;IACnB,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,gBAAgB,EAAE;EACpB;IACE,oBAAoB,EAAE;;AAE1B;EACE,kBAAkB;EAClB,SAAS;EACT,gBAAgB,EAAE;EAClB;IACE,kBAAkB;IAClB,MAAM;IACN,OAAO;IACP,sBAAsB;IACtB,uBAAuB;IACvB,oBAAoB,EAAE;;AAE1B;EACE,aAAa;EACb,YAAY;EACZ,gBAAgB,EAAE;;AAEpB;EACE,cAAc,EAAE;;AAElB;EACE,WAAW,EAAE","file":"index.css","sourcesContent":["@charset \"UTF-8\";\n/**\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 */\n.has-icon-arrow-right-alt .wp-block-button__link::before,\n.has-icon-arrow-right-alt .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-right-alt:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-arrow-right-alt2 .wp-block-button__link::before,\n.has-icon-arrow-right-alt2 .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-right-alt2:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-arrow-left-alt .wp-block-button__link::before,\n.has-icon-arrow-left-alt .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-left-alt:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-arrow-left-alt2 .wp-block-button__link::before,\n.has-icon-arrow-left-alt2 .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-left-alt2:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-clock .wp-block-button__link::before,\n.has-icon-clock .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-clock.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-clock.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-clock:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-location .wp-block-button__link::before,\n.has-icon-location .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-location.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-location.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-location:hover .wp-block-button__link::after {\n right: -6px; }\n\n.noor-block-bullet-point {\n display: flex;\n width: 100%; }\n .noor-block-bullet-point.has-align-center {\n justify-content: center; }\n .noor-block-bullet-point.has-align-right {\n justify-content: flex-end; }\n .noor-block-bullet-point.has-align-left {\n justify-content: flex-start; }\n .noor-block-bullet-point__point {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 87px;\n height: 87px;\n border-radius: 50%;\n overflow: hidden; }\n .noor-block-bullet-point__text-content {\n margin: 0 !important; }\n\n.noor-block-google-map {\n position: relative;\n height: 0;\n overflow: hidden; }\n .noor-block-google-map iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100% !important;\n height: 100% !important;\n border: 0 !important; }\n\n.noor-block-accordion__content {\n display: none;\n height: auto;\n max-height: 100%; }\n\n.noor-block-accordion[aria-expanded=\"true\"] + .noor-block-accordion__content {\n display: block; }\n\n.components-responsive-wrapper__content {\n width: auto; }\n"],"sourceRoot":""} \ No newline at end of file diff --git a/build/index.js b/build/index.js index e862293..8372aa9 100644 --- a/build/index.js +++ b/build/index.js @@ -1 +1,1617 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{18:function(e,t,n){}}]),function(e){function t(t){for(var o,a,l=t[0],i=t[1],s=t[2],b=0,d=[];be.length)&&(t=e.length);for(var n=0,o=new Array(t);n arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) { + arr2[i] = arr[i]; + } + + return arr2; +} + +module.exports = _arrayLikeToArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; +} + +module.exports = _arrayWithHoles; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": +/*!***************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! + \***************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +module.exports = _defineProperty; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/extends.js": +/*!********************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/extends.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _extends() { + module.exports = _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + return _extends.apply(this, arguments); +} + +module.exports = _extends; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": +/*!*********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _iterableToArrayLimit(arr, i) { + if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; + var _arr = []; + var _n = true; + var _d = false; + var _e = undefined; + + try { + for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + + return _arr; +} + +module.exports = _iterableToArrayLimit; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js": +/*!****************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} + +module.exports = _nonIterableRest; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js": +/*!**************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js"); + +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); + +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); + +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js"); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; + +/***/ }), + +/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": +/*!***************************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); +} + +module.exports = _unsupportedIterableToArray; + +/***/ }), + +/***/ "./src/blocks/accordion/edit.js": +/*!**************************************!*\ + !*** ./src/blocks/accordion/edit.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Edit; }); +/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js"); +/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _components_radio_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/radio-group */ "./src/components/radio-group.js"); + + + + + + + +function Edit(props) { + var titleColor = props.titleColor, + setTitleColor = props.setTitleColor, + titleBackground = props.titleBackground, + setTitleBackground = props.setTitleBackground, + contentBackground = props.contentBackground, + setContentBackground = props.setContentBackground, + attributes = props.attributes, + setAttributes = props.setAttributes, + mediaControl = props.mediaControl; + + var _useState = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["useState"])(false), + _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2), + expanded = _useState2[0], + setExpanded = _useState2[1]; + + var titleColorClass = titleColor.class != undefined ? titleColor.class : ''; + var titleBackgroundClass = titleBackground.class != undefined ? titleBackground.class : ''; + var contentBackgroundClass = contentBackground.class != undefined ? contentBackground.class : ''; + var titleTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']; + var icons = { + expand: ['arrow-down', 'arrow-right', 'arrow-down-alt2', 'arrow-right-alt2', 'arrow-down-alt', 'arrow-right-alt', 'plus'], + collapse: ['arrow-up', 'arrow-up-alt2', 'minus', 'arrow-up-alt', 'no-alt'] + }; + + var setTitleTag = function setTitleTag(event) { + return setAttributes({ + titleTag: event.target.value + }); + }; + + var setExpandIcon = function setExpandIcon(event) { + event.preventDefault(); + return setAttributes({ + expandIcon: event.currentTarget.value + }); + }; + + var setCollapseIcon = function setCollapseIcon(event) { + event.preventDefault(); + return setAttributes({ + collapseIcon: event.currentTarget.value + }); + }; + + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Base Settings'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", { + className: "block-base-control__label" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Anchor title'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["__experimentalInputControl"], { + value: attributes.anchorContent, + onChange: function onChange(anchorContent) { + return setAttributes({ + anchorContent: anchorContent + }); + } + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", { + className: "block-base-control__label" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Initial state'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["ToggleControl"], { + label: attributes.initialState ? 'Expanded by default' : 'Collapsed by default', + checked: attributes.initialState, + onChange: function onChange() { + return setAttributes({ + initialState: !attributes.initialState + }); + } + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_components_radio_group__WEBPACK_IMPORTED_MODULE_5__["RadioGroup"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Title size'), + onClick: setTitleTag, + options: titleTags, + initialChecked: attributes.titleTag + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Icon settings'), + initialOpen: false + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_components_radio_group__WEBPACK_IMPORTED_MODULE_5__["RadioGroup"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Expand Icon'), + onClick: setExpandIcon, + options: icons.expand, + initialChecked: attributes.expandIcon, + showIcons: true + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_components_radio_group__WEBPACK_IMPORTED_MODULE_5__["RadioGroup"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Collapse Icon'), + onClick: setCollapseIcon, + options: icons.collapse, + initialChecked: attributes.collapseIcon, + showIcons: true + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Mobile View Control'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["ToggleControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])("".concat(props.attributes.mediaControl ? 'Display' : 'Hide', " on mobile")), + checked: props.attributes.mediaControl, + onChange: function onChange(mediaControl) { + return props.setAttributes({ + mediaControl: mediaControl + }); + } + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["PanelColorSettings"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Color settings'), + initialOpen: false, + colorSettings: [{ + value: titleColor.color, + onChange: setTitleColor, + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Title text color') + }, { + value: titleBackground.color, + onChange: setTitleBackground, + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Title background color') + }, { + value: contentBackground.color, + onChange: setContentBackground, + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Content background color') + }] + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { + id: "#".concat(attributes.anchorContent), + className: "noor-block-accordion ".concat(titleBackgroundClass), + onClick: function onClick() { + return setExpanded(!expanded); + }, + "aria-expanded": "".concat(attributes.initialState || expanded) + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["RichText"], { + className: "noor-block-accordion__title ".concat(titleColorClass), + tagName: attributes.titleTag, + value: attributes.titleContent, + formattingControls: ['bold', 'italic', 'align'], + onChange: function onChange(titleContent) { + return setAttributes({ + titleContent: titleContent + }); + } + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["Dashicon"], { + icon: expanded ? attributes.collapseIcon : attributes.expandIcon, + className: "noor-block-accordion__icon ".concat(titleColorClass) + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { + className: "noor-block-accordion__content ".concat(contentBackgroundClass) + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["InnerBlocks"], { + allowedBlocks: ['core/paragraph', 'core/list', 'core/button'], + template: [['core/paragraph', {}]] + }))); +} + +/***/ }), + +/***/ "./src/blocks/accordion/index.js": +/*!***************************************!*\ + !*** ./src/blocks/accordion/index.js ***! + \***************************************/ +/*! exports provided: name, settings */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; }); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/blocks/accordion/edit.js"); +/* harmony import */ var _save__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./save */ "./src/blocks/accordion/save.js"); + + + + +var name = 'accordion'; +var settings = { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Accordion', 'accordion'), + description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__["__"])('Accordion block', 'blocks'), + category: 'noor-collection', + icon: 'list-view', + supports: { + html: false + }, + attributes: { + anchorContent: { + type: 'string', + default: '' + }, + titleContent: { + type: 'string', + default: 'Example title...' + }, + titleTag: { + type: 'string', + default: 'h4' + }, + initialState: { + type: 'boolean', + default: false + }, + titleColor: { + type: 'string' + }, + titleBackground: { + type: 'string' + }, + contentBackground: { + type: 'string' + }, + expandIcon: { + type: 'string', + default: 'arrow-down-alt2' + }, + collapseIcon: { + type: 'string', + default: 'arrow-up-alt2' + }, + iconAlignment: { + type: 'string', + default: 'right' + }, + mediaControl: { + type: 'boolean', + default: true + } + }, + edit: Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__["withColors"])({ + titleColor: 'color', + titleBackground: 'background-color', + contentBackground: 'background-color' + })(_edit__WEBPACK_IMPORTED_MODULE_2__["default"]), + save: _save__WEBPACK_IMPORTED_MODULE_3__["default"] +}; + +/***/ }), + +/***/ "./src/blocks/accordion/save.js": +/*!**************************************!*\ + !*** ./src/blocks/accordion/save.js ***! + \**************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return save; }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); + + + +function save(_ref) { + var attributes = _ref.attributes; + var titleColor = attributes.titleColor, + titleBackground = attributes.titleBackground, + contentBackground = attributes.contentBackground, + mediaControl = attributes.mediaControl; + var titleColorClass = titleColor != undefined ? Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["getColorClassName"])('color', titleColor) : ''; + var titleBackgroundClass = titleBackground != undefined ? Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["getColorClassName"])('background-color', titleBackground) : ''; + var contentBackgroundClass = contentBackground != undefined ? Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["getColorClassName"])('background-color', contentBackground) : ''; + var hide = mediaControl ? '' : 'on-media-hide'; + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + id: "#".concat(attributes.anchorContent), + className: "noor-block-accordion ".concat(titleBackgroundClass, " ").concat(hide), + "aria-expanded": attributes.initialState + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["RichText"].Content, { + className: "noor-block-accordion__title ".concat(titleColorClass), + tagName: attributes.titleTag, + value: attributes.titleContent + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { + className: "noor-block-accordion__icon dashicons dashicons-".concat(attributes.expandIcon, " ").concat(titleColorClass), + "aria-hidden": "true", + "data-state": !attributes.initialState + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("span", { + className: "noor-block-accordion__icon dashicons dashicons-".concat(attributes.collapseIcon, " ").concat(titleColorClass), + "aria-hidden": "true", + "data-state": attributes.initialState + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: "noor-block-accordion__content ".concat(contentBackgroundClass) + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["InnerBlocks"].Content, null))); +} + +/***/ }), + +/***/ "./src/blocks/bulletpoint/edit.js": +/*!****************************************!*\ + !*** ./src/blocks/bulletpoint/edit.js ***! + \****************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Edit; }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__); + + + + + +function Edit(props) { + var color = props.color, + setColor = props.setColor, + backgroundColor = props.backgroundColor, + setBackgroundColor = props.setBackgroundColor, + attributes = props.attributes, + setAttributes = props.setAttributes, + className = props.className; + var align = attributes.align, + mediaId = attributes.mediaId, + mediaControl = attributes.mediaControl; + var colorClass = color.class != undefined ? color.class : ''; + var backgroundColorClass = backgroundColor.class != undefined ? backgroundColor.class : ''; + + var removeMedia = function removeMedia() { + props.setAttributes({ + mediaId: 0, + mediaUrl: '' + }); + }; + + var onSelectMedia = function onSelectMedia(media) { + props.setAttributes({ + mediaId: media.id, + mediaUrl: media.url + }); + }; + + var blockStyle = { + backgroundImage: attributes.mediaUrl != '' ? 'url("' + attributes.mediaUrl + '")' : 'none' + }; + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Content settings'), + initialOpen: false + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["ToggleControl"], { + label: attributes.useMedia ? 'Set text content' : 'Set background image', + checked: attributes.useMedia, + onChange: function onChange() { + return setAttributes({ + useMedia: !attributes.useMedia + }); + } + }), attributes.useMedia ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: "editor-post-featured-image" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["MediaUploadCheck"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["MediaUpload"], { + onSelect: onSelectMedia, + value: mediaId, + allowedTypes: ['image'], + render: function render(_ref) { + var open = _ref.open; + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["Button"], { + className: mediaId == 0 ? 'editor-post-featured-image__toggle' : 'editor-post-featured-image__preview', + onClick: open + }, mediaId == 0 && Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Choose an image'), props.media != undefined && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["ResponsiveWrapper"], { + naturalWidth: props.media.media_details.width, + naturalHeight: props.media.media_details.height + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("img", { + src: props.media.source_url + }))); + } + }))) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["__experimentalInputControl"], { + value: attributes.mediaInput, + onChange: function onChange(mediaInput) { + return setAttributes({ + mediaInput: mediaInput + }); + } + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mobile View Control'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__["ToggleControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])("".concat(props.attributes.mediaControl ? 'Display' : 'Hide', " on mobile")), + checked: props.attributes.mediaControl, + onChange: function onChange(mediaControl) { + return props.setAttributes({ + mediaControl: mediaControl + }); + } + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["PanelColorSettings"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Colot settings'), + initialOpen: true, + colorSettings: [{ + value: color.color, + onChange: setColor, + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Text color') + }, { + value: backgroundColor.color, + onChange: setBackgroundColor, + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Background color') + }] + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["BlockControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["BlockAlignmentToolbar"], { + value: align, + onChange: function onChange(nextAlign) { + setAttributes({ + align: nextAlign + }); + }, + controls: ['left', 'right', 'center'] + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: "noor-block-bullet-point has-align-".concat(align) + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: "noor-block-bullet-point__point ".concat(backgroundColorClass) + }, attributes.useMedia && attributes.mediaId != 0 ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("img", { + src: attributes.mediaUrl + }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("h3", { + className: "noor-block-bullet-point__text-content ".concat(colorClass) + }, attributes.mediaInput)))); +} + +/***/ }), + +/***/ "./src/blocks/bulletpoint/index.js": +/*!*****************************************!*\ + !*** ./src/blocks/bulletpoint/index.js ***! + \*****************************************/ +/*! exports provided: name, settings */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__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 _edit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edit */ "./src/blocks/bulletpoint/edit.js"); + + + + + + + +var name = 'bullet-point'; +var settings = { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Bullet point', 'accordion'), + description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Bullet point block', 'blocks'), + category: 'noor-collection', + icon: 'marker', + supports: { + html: false + }, + attributes: { + color: { + type: 'string' + }, + backgroundColor: { + type: 'string' + }, + align: { + type: 'string', + default: 'center' + }, + useMedia: { + type: 'boolean', + default: false + }, + mediaInput: { + type: 'string', + default: '' + }, + mediaId: { + type: 'number', + default: 0 + }, + mediaUrl: { + type: 'string', + default: '' + }, + mediaControl: { + type: 'boolean', + default: true + } + }, + edit: Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_3__["compose"])(Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["withColors"])({ + color: 'color', + backgroundColor: 'background-color' + }), Object(_wordpress_data__WEBPACK_IMPORTED_MODULE_4__["withSelect"])(function (select, props) { + return { + media: props.attributes.mediaId ? select('core').getMedia(props.attributes.mediaId) : undefined + }; + }))(_edit__WEBPACK_IMPORTED_MODULE_5__["default"]), + save: function save(_ref) { + var attributes = _ref.attributes; + var color = attributes.color, + backgroundColor = attributes.backgroundColor, + align = attributes.align, + mediaControl = attributes.mediaControl; + var colorClass = color != undefined ? Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["getColorClassName"])('color', color) : ''; + var backgroundColorClass = backgroundColor != undefined ? Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__["getColorClassName"])('background-color', backgroundColor) : ''; + var hide = mediaControl ? '' : 'on-media-hide'; + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: "noor-block-bullet-point has-align-".concat(align, " ").concat(hide) + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: "noor-block-bullet-point__point ".concat(backgroundColorClass) + }, attributes.useMedia && attributes.mediaId != 0 ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("img", { + src: attributes.mediaUrl + }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("h3", { + className: "noor-block-bullet-point__text-content ".concat(colorClass) + }, attributes.mediaInput))); + } +}; + +/***/ }), + +/***/ "./src/blocks/google-map/edit.js": +/*!***************************************!*\ + !*** ./src/blocks/google-map/edit.js ***! + \***************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Edit; }); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"); +/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); + + + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + + + + + +function Edit(props) { + var srcBase = 'https://www.google.com/maps/embed/v1/place?key='; + var googleAPIKey = options.map_secret_key; + var attributes = props.attributes, + setAttributes = props.setAttributes; + var width = attributes.width, + height = attributes.height, + zoom = attributes.zoom, + address = attributes.address, + mediaControl = attributes.mediaControl; + var getaddress = Object.values(address).filter(function (line) { + return line != ''; + }); + var queryString = getaddress.reduce(function (acc, curr, i) { + return acc + ' ' + curr; + }, '').trim().toLowerCase(); + var getSrc = "".concat(srcBase + googleAPIKey, "&q=").concat(encodeURI(queryString), "&zoom=").concat(zoom); + setAttributes({ + src: getSrc + }); + var styles = { + width: width + '%', + paddingBottom: height + '%' + }; + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Map Controls'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["RangeControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Frame Width'), + value: width, + onChange: function onChange(width) { + return setAttributes({ + width: width + }); + }, + min: 0, + max: 100 + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["RangeControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Frame Height'), + value: height, + onChange: function onChange(height) { + return setAttributes({ + height: height + }); + }, + min: 0, + max: 100 + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["RangeControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Frame Zoom'), + value: zoom, + onChange: function onChange(zoom) { + return setAttributes({ + zoom: zoom + }); + }, + min: 0, + max: 100 + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Map Location'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", { + className: "block-base-control__label" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Street Address'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["__experimentalInputControl"], { + value: address.street, + onChange: function onChange(street) { + return setAttributes({ + address: _objectSpread(_objectSpread({}, address), {}, { + street: street + }) + }); + } + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", { + className: "block-base-control__label" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Postal Code/Zip'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["__experimentalInputControl"], { + value: address.zip, + onChange: function onChange(zip) { + return setAttributes({ + address: _objectSpread(_objectSpread({}, address), {}, { + zip: zip + }) + }); + } + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", { + className: "block-base-control__label" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('City'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["__experimentalInputControl"], { + value: address.city, + onChange: function onChange(city) { + return setAttributes({ + address: _objectSpread(_objectSpread({}, address), {}, { + city: city + }) + }); + } + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("label", { + className: "block-base-control__label" + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Country'))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["__experimentalInputControl"], { + value: address.country, + onChange: function onChange(country) { + return setAttributes({ + address: _objectSpread(_objectSpread({}, address), {}, { + country: country + }) + }); + } + })), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Mobile View Control'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(ToggleControl, { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])("".concat(props.attributes.mediaControl ? 'Display' : 'Hide', " on mobile")), + checked: props.attributes.mediaControl, + onChange: function onChange(mediaControl) { + return props.setAttributes({ + mediaControl: mediaControl + }); + } + }))), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("div", { + className: "noor-block-google-map", + style: styles + }, googleAPIKey != '' ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("iframe", { + width: "361", + height: "160", + src: getSrc, + frameBorder: "0", + allowFullScreen: true + }) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("p", null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Please provide API key in settings')))); +} + +/***/ }), + +/***/ "./src/blocks/google-map/index.js": +/*!****************************************!*\ + !*** ./src/blocks/google-map/index.js ***! + \****************************************/ +/*! exports provided: name, settings */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./edit */ "./src/blocks/google-map/edit.js"); + + + +var name = 'google-map'; +var settings = { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Google map', 'noorblocks'), + description: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Embeds an google maps iframe', 'noorblocks'), + category: 'noor-collection', + icon: 'location-alt', + supports: { + html: false, + align: true + }, + attributes: { + zoom: { + type: 'number', + default: 20 + }, + width: { + type: 'number', + default: 100 + }, + height: { + type: 'number', + default: 75 + }, + address: { + type: 'object', + default: { + street: '', + zip: '', + city: '', + country: 'sweden' + } + }, + src: { + type: 'string' + }, + mediaControl: { + type: 'boolean', + default: true + } + }, + edit: _edit__WEBPACK_IMPORTED_MODULE_2__["default"], + save: function save(props) { + var _props$attributes = props.attributes, + width = _props$attributes.width, + height = _props$attributes.height, + src = _props$attributes.src; + props.className = "noor-block-google-map ".concat(props.attributes.mediaControl ? '' : 'on-media-hide'); + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("div", { + className: props.className, + style: { + width: "".concat(width, "%"), + paddingBottom: "".concat(height, "%") + } + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("iframe", { + width: "361", + height: "160", + frameBorder: "0", + src: src, + allowFullScreen: true + })); + } +}; + +/***/ }), + +/***/ "./src/components/controls.js": +/*!************************************!*\ + !*** ./src/components/controls.js ***! + \************************************/ +/*! exports provided: SmallScreenControl */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SmallScreenControl", function() { return SmallScreenControl; }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); + + + +function SmallScreenControl(props) { + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Mobile View Control'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["ToggleControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])("".concat(props.attributes.mediaControl ? 'Display' : 'Hide', " on mobile")), + checked: props.attributes.mediaControl, + onChange: function onChange(mediaControl) { + return props.setAttributes({ + mediaControl: mediaControl + }); + } + })); +} + +/***/ }), + +/***/ "./src/components/radio-group.js": +/*!***************************************!*\ + !*** ./src/components/radio-group.js ***! + \***************************************/ +/*! exports provided: RadioGroup */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RadioGroup", function() { return RadioGroup; }); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js"); +/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__); + + + +var RadioGroup = function RadioGroup(_ref) { + var _onClick = _ref.onClick, + options = _ref.options, + initialChecked = _ref.initialChecked, + showIcons = _ref.showIcons, + label = _ref.label; + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["ButtonGroup"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({ + mode: "radio" + }, !showIcons && { + onClick: function onClick(event) { + return _onClick(event); + } + }), label && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("p", null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])("strong", null, label)), options.map(function (option, index) { + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Button"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, showIcons && { + onClick: function onClick(event) { + return _onClick(event); + } + }, { + className: initialChecked === option && 'is-primary', + key: index, + checked: initialChecked, + value: option + }), showIcons ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__["Dashicon"], { + icon: option + }) : option); + })); +}; + +/***/ }), + +/***/ "./src/filters/attributes.js": +/*!***********************************!*\ + !*** ./src/filters/attributes.js ***! + \***********************************/ +/*! exports provided: attributes */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attributes", function() { return attributes; }); +var attributes = function attributes(settings, name) { + if (!name.includes('noor')) { + Object.assign(settings.attributes, { + mediaControl: { + type: 'boolean', + default: true + } + }); + } + + if ('core/button' === name) { + Object.assign(settings.attributes, { + useIcon: { + type: 'boolean', + default: true + }, + alignIcon: { + type: 'boolean', + default: false + }, + icon: { + type: 'string', + default: 'arrow-right-alt' + } + }); + } + + if ('core/column' === name) { + Object.assign(settings.attributes, { + backgroundColor: { + type: 'string' + } + }); + } + + return settings; +}; + +/***/ }), + +/***/ "./src/filters/blockEdit.js": +/*!**********************************!*\ + !*** ./src/filters/blockEdit.js ***! + \**********************************/ +/*! exports provided: blockEdit */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blockEdit", function() { return blockEdit; }); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); +/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); +/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose"); +/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); +/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); +/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _components_radio_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../components/radio-group */ "./src/components/radio-group.js"); +/* harmony import */ var _components_controls__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../components/controls */ "./src/components/controls.js"); + + + + + + + + + +var iconControlOptions = ['arrow-right-alt', 'arrow-left-alt', 'arrow-right-alt2', 'arrow-left-alt2', 'clock', 'location']; +var blockEdit = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["compose"])(Object(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["withColors"])({ + backgroundColor: 'background-color' +}), Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_2__["createHigherOrderComponent"])(function (BlockEdit) { + return function (props) { + if (!props.name.includes('noor')) { + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockEdit, props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_components_controls__WEBPACK_IMPORTED_MODULE_6__["SmallScreenControl"], props))); + } + + if (props.name === 'core/column') { + var backgroundColor = props.backgroundColor, + setBackgroundColor = props.setBackgroundColor; + props.setAttributes({ + className: backgroundColor.class != undefined ? backgroundColor.class + ' has-background' : '' + }); + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockEdit, props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["PanelColorSettings"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Color settings'), + initialOpen: false, + colorSettings: [{ + value: backgroundColor.color, + onChange: setBackgroundColor, + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Column background color') + }] + }))); + } + + if (props.name === 'core/button') { + var attributes = props.attributes, + setAttributes = props.setAttributes; + var _props$attributes = props.attributes, + useIcon = _props$attributes.useIcon, + alignIcon = _props$attributes.alignIcon, + icon = _props$attributes.icon; + + var setIconClassList = function setIconClassList() { + var align = alignIcon ? 'has-left-icon' : 'has-right-icon'; + var iconName = useIcon && icon !== '' ? "has-icon-".concat(icon) : undefined; + var className = align + ' ' + iconName; + setAttributes({ + className: className + }); + }; + + var setUseIcon = function setUseIcon(useIcon) { + setAttributes({ + useIcon: useIcon + }); + + if (!useIcon) { + setIcon(''); + } + }; + + var setIcon = function setIcon(value, event) { + if (event) { + event.preventDefault(); + } + + setAttributes({ + icon: value + }); + setIconClassList(); + }; + + setIcon(icon); + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockEdit, props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["PanelBody"], { + title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Inline Icon Control'), + initialOpen: true + }, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["ToggleControl"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Use inline icon'), + checked: useIcon, + onChange: setUseIcon + }), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__["ToggleControl"], { + label: alignIcon ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Icon before') : Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Icon after'), + checked: alignIcon, + onChange: function onChange() { + return setAttributes({ + alignIcon: !alignIcon + }); + } + }), useIcon && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_components_radio_group__WEBPACK_IMPORTED_MODULE_5__["RadioGroup"], { + label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__["__"])('Inline Icon'), + onClick: function onClick(event) { + event.preventDefault(); + setAttributes({ + icon: event.currentTarget.value, + event: event + }); + }, + options: iconControlOptions, + initialChecked: props.attributes.icon, + showIcons: true + })))); + } + + return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockEdit, props); + }; +}, 'blockEdit')); + +/***/ }), + +/***/ "./src/filters/extraProps.js": +/*!***********************************!*\ + !*** ./src/filters/extraProps.js ***! + \***********************************/ +/*! exports provided: extraProps */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extraProps", function() { return extraProps; }); +var extraProps = function extraProps(props, blockType, attributes) { + if (!attributes.mediaControl && !blockType.name.includes('noor')) { + props.className = props.className + ' on-media-hide'; + } + + return props; +}; + +/***/ }), + +/***/ "./src/filters/index.js": +/*!******************************!*\ + !*** ./src/filters/index.js ***! + \******************************/ +/*! exports provided: filters */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filters", function() { return filters; }); +/* harmony import */ var _attributes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./attributes */ "./src/filters/attributes.js"); +/* harmony import */ var _blockEdit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./blockEdit */ "./src/filters/blockEdit.js"); +/* harmony import */ var _extraProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./extraProps */ "./src/filters/extraProps.js"); + + + +var filters = { + attributes: _attributes__WEBPACK_IMPORTED_MODULE_0__["attributes"], + blockEdit: _blockEdit__WEBPACK_IMPORTED_MODULE_1__["blockEdit"], + extraProps: _extraProps__WEBPACK_IMPORTED_MODULE_2__["extraProps"] +}; + +/***/ }), + +/***/ "./src/index.js": +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); +/* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _blocks_accordion_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./blocks/accordion/index */ "./src/blocks/accordion/index.js"); +/* harmony import */ var _blocks_bulletpoint_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blocks/bulletpoint/index */ "./src/blocks/bulletpoint/index.js"); +/* harmony import */ var _blocks_google_map_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./blocks/google-map/index */ "./src/blocks/google-map/index.js"); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); +/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _filters_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./filters/index */ "./src/filters/index.js"); + + + + + + +var prefix = 'noor/'; + +var registerBlock = function registerBlock(block) { + var name = block.name, + settings = block.settings; + Object(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__["registerBlockType"])(prefix + name, settings); +}; + +var registerNoorBlocks = function registerNoorBlocks() { + return [_blocks_accordion_index__WEBPACK_IMPORTED_MODULE_1__, _blocks_bulletpoint_index__WEBPACK_IMPORTED_MODULE_2__, _blocks_google_map_index__WEBPACK_IMPORTED_MODULE_3__].forEach(function (block) { + return registerBlock(block); + }); +}; + +Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__["addFilter"])('blocks.registerBlockType', 'noor/gutenberg-blocks/custom-attributes', _filters_index__WEBPACK_IMPORTED_MODULE_5__["filters"].attributes); +Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__["addFilter"])('editor.BlockEdit', 'noor/gutenberg-blocks/custom-control', _filters_index__WEBPACK_IMPORTED_MODULE_5__["filters"].blockEdit); +Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__["addFilter"])('blocks.getSaveContent.extraProps', 'noor/gutenberg-blocks/extraProps', _filters_index__WEBPACK_IMPORTED_MODULE_5__["filters"].extraProps); +registerNoorBlocks(); + +/***/ }), + +/***/ "./src/styles/editor.scss": +/*!********************************!*\ + !*** ./src/styles/editor.scss ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), + +/***/ 0: +/*!*****************************************************************************!*\ + !*** multi ./src/index.js ./src/styles/style.scss ./src/styles/editor.scss ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(/*! C:\Users\Christoffer\Projects\Wordpress\Plugins\gutenberg-blocks\src\index.js */"./src/index.js"); +__webpack_require__(/*! C:\Users\Christoffer\Projects\Wordpress\Plugins\gutenberg-blocks\src\styles\style.scss */"./src/styles/style.scss"); +module.exports = __webpack_require__(/*! C:\Users\Christoffer\Projects\Wordpress\Plugins\gutenberg-blocks\src\styles\editor.scss */"./src/styles/editor.scss"); + + +/***/ }), + +/***/ "@wordpress/block-editor": +/*!**********************************************!*\ + !*** external {"this":["wp","blockEditor"]} ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["blockEditor"]; }()); + +/***/ }), + +/***/ "@wordpress/blocks": +/*!*****************************************!*\ + !*** external {"this":["wp","blocks"]} ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["blocks"]; }()); + +/***/ }), + +/***/ "@wordpress/components": +/*!*********************************************!*\ + !*** external {"this":["wp","components"]} ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["components"]; }()); + +/***/ }), + +/***/ "@wordpress/compose": +/*!******************************************!*\ + !*** external {"this":["wp","compose"]} ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["compose"]; }()); + +/***/ }), + +/***/ "@wordpress/data": +/*!***************************************!*\ + !*** external {"this":["wp","data"]} ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["data"]; }()); + +/***/ }), + +/***/ "@wordpress/element": +/*!******************************************!*\ + !*** external {"this":["wp","element"]} ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["element"]; }()); + +/***/ }), + +/***/ "@wordpress/hooks": +/*!****************************************!*\ + !*** external {"this":["wp","hooks"]} ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["hooks"]; }()); + +/***/ }), + +/***/ "@wordpress/i18n": +/*!***************************************!*\ + !*** external {"this":["wp","i18n"]} ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +(function() { module.exports = this["wp"]["i18n"]; }()); + +/***/ }) + +/******/ }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/build/index.js.map b/build/index.js.map new file mode 100644 index 0000000..6f03a4a --- /dev/null +++ b/build/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./src/blocks/accordion/edit.js","webpack:///./src/blocks/accordion/index.js","webpack:///./src/blocks/accordion/save.js","webpack:///./src/blocks/bulletpoint/edit.js","webpack:///./src/blocks/bulletpoint/index.js","webpack:///./src/blocks/google-map/edit.js","webpack:///./src/blocks/google-map/index.js","webpack:///./src/components/controls.js","webpack:///./src/components/radio-group.js","webpack:///./src/filters/attributes.js","webpack:///./src/filters/blockEdit.js","webpack:///./src/filters/extraProps.js","webpack:///./src/filters/index.js","webpack:///./src/index.js","webpack:///./src/styles/editor.scss","webpack:///external {\"this\":[\"wp\",\"blockEditor\"]}","webpack:///external {\"this\":[\"wp\",\"blocks\"]}","webpack:///external {\"this\":[\"wp\",\"components\"]}","webpack:///external {\"this\":[\"wp\",\"compose\"]}","webpack:///external {\"this\":[\"wp\",\"data\"]}","webpack:///external {\"this\":[\"wp\",\"element\"]}","webpack:///external {\"this\":[\"wp\",\"hooks\"]}","webpack:///external {\"this\":[\"wp\",\"i18n\"]}"],"names":["Edit","props","titleColor","setTitleColor","titleBackground","setTitleBackground","contentBackground","setContentBackground","attributes","setAttributes","mediaControl","useState","expanded","setExpanded","titleColorClass","class","undefined","titleBackgroundClass","contentBackgroundClass","titleTags","icons","expand","collapse","setTitleTag","event","titleTag","target","value","setExpandIcon","preventDefault","expandIcon","currentTarget","setCollapseIcon","collapseIcon","__","anchorContent","initialState","color","onChange","label","titleContent","name","settings","title","description","category","icon","supports","html","type","default","iconAlignment","edit","withColors","save","getColorClassName","hide","setColor","backgroundColor","setBackgroundColor","className","align","mediaId","colorClass","backgroundColorClass","removeMedia","mediaUrl","onSelectMedia","media","id","url","blockStyle","backgroundImage","useMedia","open","media_details","width","height","source_url","mediaInput","nextAlign","compose","withSelect","select","getMedia","srcBase","googleAPIKey","options","map_secret_key","zoom","address","getaddress","Object","values","filter","line","queryString","reduce","acc","curr","i","trim","toLowerCase","getSrc","encodeURI","src","styles","paddingBottom","street","zip","city","country","SmallScreenControl","RadioGroup","onClick","initialChecked","showIcons","map","option","index","includes","assign","useIcon","alignIcon","iconControlOptions","blockEdit","createHigherOrderComponent","BlockEdit","setIconClassList","iconName","setUseIcon","setIcon","extraProps","blockType","filters","prefix","registerBlock","block","registerBlockType","registerNoorBlocks","accordion","bulletPoint","googleMap","forEach","addFilter"],"mappings":";;;;;;;;;;;;;;;;QAAA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;QACA,QAAQ,oBAAoB;QAC5B;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA,iBAAiB,4BAA4B;QAC7C;QACA;QACA,kBAAkB,2BAA2B;QAC7C;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA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AE,I","file":"index.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"style-index\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","import { __ } from '@wordpress/i18n';\r\nimport { Fragment, useState } from '@wordpress/element'\r\nimport { InspectorControls, InnerBlocks, RichText, PanelColorSettings } from '@wordpress/block-editor'\r\nimport { Dashicon, PanelBody, ToggleControl, __experimentalInputControl as InputControl } from '@wordpress/components'\r\nimport { RadioGroup } from '../../components/radio-group'\r\n\r\nexport default function Edit( props ) {\r\n\t\r\n\tconst { titleColor, setTitleColor, titleBackground, setTitleBackground, contentBackground, setContentBackground, attributes, setAttributes, mediaControl } = props;\r\n\t\r\n\tconst [expanded, setExpanded] = useState(false);\r\n\r\n\tconst titleColorClass = titleColor.class != undefined ? titleColor.class : '';\r\n\t\r\n\tconst titleBackgroundClass = titleBackground.class != undefined ? titleBackground.class : '';\r\n\r\n\tconst contentBackgroundClass = contentBackground.class != undefined ? contentBackground.class : '';\r\n\r\n\tconst titleTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\r\n\r\n\tconst icons = {\r\n\t\texpand: ['arrow-down', 'arrow-right', 'arrow-down-alt2', 'arrow-right-alt2', 'arrow-down-alt', 'arrow-right-alt', 'plus'],\r\n\t\tcollapse: ['arrow-up', 'arrow-up-alt2', 'minus', 'arrow-up-alt', 'no-alt']\r\n\t}\r\n\r\n\tconst setTitleTag = event => setAttributes({ titleTag: event.target.value });\r\n\r\n\tconst setExpandIcon = event => {\r\n\t\t\r\n\t\tevent.preventDefault();\r\n\t\treturn setAttributes({ expandIcon: event.currentTarget.value });\r\n\t}\r\n\r\n\tconst setCollapseIcon = event => {\r\n\t\t\r\n\t\tevent.preventDefault();\r\n\t\treturn setAttributes({ collapseIcon: event.currentTarget.value });\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\r\n\t\t\t\t\t setAttributes({anchorContent})}\r\n\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t setAttributes({initialState: !attributes.initialState})}\r\n\t\t\t\t\t/>\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t \r\n props.setAttributes({ mediaControl })}\r\n />\r\n \r\n\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
setExpanded(!expanded)} \r\n\t\t\t\taria-expanded={`${attributes.initialState || expanded}`}\r\n\t\t\t>\r\n\t\t\t\t setAttributes({titleContent})}\r\n\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
\r\n\t\t
\r\n\t);\r\n}\r\n","import { __ } from '@wordpress/i18n';\r\nimport { withColors } from '@wordpress/block-editor'\r\nimport Edit from './edit';\r\nimport save from './save';\r\n\r\nexport const name = 'accordion';\r\n\r\nexport const settings = {\r\n title: __( 'Accordion', 'accordion' ),\r\n\tdescription: __( 'Accordion block', 'blocks' ),\r\n\tcategory: 'noor-collection',\r\n\ticon: 'list-view',\r\n\tsupports: {\r\n\t\thtml: false,\r\n\t},\r\n\tattributes: {\r\n\t\tanchorContent: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\ttitleContent: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: 'Example title...'\r\n\t\t},\r\n\t\ttitleTag: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: 'h4'\r\n\t\t},\r\n\t\tinitialState: {\r\n\t\t\ttype: 'boolean',\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\ttitleColor: {\r\n\t\t\ttype: 'string'\r\n\t\t},\r\n\t\ttitleBackground: {\r\n\t\t\ttype: 'string'\r\n\t\t},\r\n\t\tcontentBackground: {\r\n\t\t\ttype: 'string'\r\n\t\t},\r\n\t\texpandIcon: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: 'arrow-down-alt2'\r\n\t\t},\r\n\t\tcollapseIcon: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: 'arrow-up-alt2'\r\n\t\t},\r\n\t\ticonAlignment: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: 'right'\r\n\t\t},\r\n\t\tmediaControl: {\r\n\t\t\ttype: 'boolean',\r\n\t\t\tdefault: true\r\n\t\t}\r\n\t},\r\n\tedit: withColors({\r\n\t\ttitleColor: 'color', \r\n\t\ttitleBackground: 'background-color', \r\n\t\tcontentBackground: 'background-color'\r\n\t})( Edit ),\r\n\tsave,\r\n}","import { __ } from '@wordpress/i18n';\r\nimport { InnerBlocks, RichText, getColorClassName } from '@wordpress/block-editor'\r\n\r\nexport default function save( { attributes } ) {\r\n\r\n\tconst { titleColor, titleBackground, contentBackground, mediaControl } = attributes;\r\n\r\n\tconst titleColorClass = titleColor != undefined ? getColorClassName('color', titleColor) : '';\r\n\r\n\tconst titleBackgroundClass = titleBackground != undefined ? getColorClassName('background-color', titleBackground) : '';\r\n\r\n\tconst contentBackgroundClass = contentBackground != undefined ? getColorClassName('background-color', contentBackground) : '';\r\n\t\r\n\tconst hide = mediaControl ? '' : 'on-media-hide';\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\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
\r\n\t\t\r\n\t);\r\n}\r\n","import { __ } from '@wordpress/i18n';\r\nimport { MediaUpload, MediaUploadCheck, InspectorControls, BlockControls, BlockAlignmentToolbar, PanelColorSettings } from '@wordpress/block-editor'\r\nimport { PanelBody, Button, ResponsiveWrapper, __experimentalInputControl as InputControl, ToggleControl } from '@wordpress/components'\r\nimport { Fragment } from '@wordpress/element'\r\n\r\nexport default function Edit( props ) {\r\n \r\n const {color, setColor, backgroundColor, setBackgroundColor, attributes, setAttributes, className} = props;\r\n\r\n const { align, mediaId, mediaControl } = attributes;\r\n\r\n const colorClass = color.class != undefined ? color.class : '';\r\n\r\n const backgroundColorClass = backgroundColor.class != undefined ? backgroundColor.class : '';\r\n\r\n const removeMedia = () => {\r\n\t\tprops.setAttributes({\r\n\t\t\tmediaId: 0,\r\n\t\t\tmediaUrl: ''\r\n\t\t});\r\n\t}\r\n \r\n \tconst onSelectMedia = (media) => {\r\n\t\tprops.setAttributes({\r\n\t\t\tmediaId: media.id,\r\n\t\t\tmediaUrl: media.url\r\n\t\t});\r\n\t}\r\n \r\n\tconst blockStyle = {\r\n\t\tbackgroundImage: attributes.mediaUrl != '' ? 'url(\"' + attributes.mediaUrl + '\")' : 'none'\r\n };\r\n \r\n return (\r\n \r\n\r\n \r\n \r\n setAttributes({useMedia: !attributes.useMedia})}\r\n />\r\n {attributes.useMedia \r\n ?
\r\n \r\n (\r\n \r\n {mediaId == 0 && __( 'Choose an image' )}\r\n {props.media != undefined && \r\n \r\n \r\n \r\n }\r\n \r\n )}\r\n />\r\n \r\n
\r\n : setAttributes({ mediaInput })}\r\n />}\r\n
\r\n\r\n \r\n props.setAttributes({ mediaControl })}\r\n />\r\n \r\n\r\n \r\n
\r\n \r\n \r\n {\r\n setAttributes({ align: nextAlign });\r\n }}\r\n controls={['left', 'right', 'center']}\r\n />\r\n \r\n\r\n
\r\n
\r\n {attributes.useMedia && attributes.mediaId != 0 \r\n ? \r\n :

{attributes.mediaInput}

\r\n }\r\n
\r\n
\r\n
\r\n );\r\n}","import { __ } from '@wordpress/i18n';\r\nimport { withColors } from '@wordpress/block-editor'\r\nimport { getColorClassName } from '@wordpress/block-editor'\r\nimport { compose } from '@wordpress/compose'\r\nimport { withSelect } from '@wordpress/data'\r\nimport Edit from './edit';\r\n\r\nexport const name = 'bullet-point';\r\n\r\nexport const settings = {\r\n title: __( 'Bullet point', 'accordion' ),\r\n\tdescription: __( 'Bullet point block', 'blocks' ),\r\n\tcategory: 'noor-collection',\r\n\ticon: 'marker',\r\n\tsupports: {\r\n\t\thtml: false,\r\n\t},\r\n\tattributes: {\r\n\t\tcolor: {\r\n\t\t\ttype: 'string'\r\n\t\t},\r\n\t\tbackgroundColor: {\r\n\t\t\ttype: 'string'\r\n\t\t},\r\n\t\talign: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: 'center'\r\n\t\t},\r\n\t\tuseMedia: {\r\n\t\t\ttype: 'boolean',\r\n\t\t\tdefault: false\r\n\t\t},\r\n\t\tmediaInput: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\tmediaId: {\r\n\t\t\ttype: 'number',\r\n\t\t\tdefault: 0\r\n\t\t},\r\n\t\tmediaUrl: {\r\n\t\t\ttype: 'string',\r\n\t\t\tdefault: ''\r\n\t\t},\r\n\t\tmediaControl: {\r\n\t\t\ttype: 'boolean',\r\n\t\t\tdefault: true\r\n\t\t}\r\n\t},\r\n edit: compose(\r\n\t\twithColors({ color: 'color', backgroundColor: 'background-color' }), \r\n\t\twithSelect((select, props) => {\r\n\t\t\treturn { media: props.attributes.mediaId ? select('core').getMedia(props.attributes.mediaId) : undefined}\r\n\t\t}))( Edit ),\r\n save: ({ attributes }) => {\r\n\r\n\t\tconst {color, backgroundColor, align, mediaControl} = attributes;\r\n\r\n\t\tconst colorClass = color != undefined ? getColorClassName( 'color', color ) : '';\r\n\t\t\r\n\t\tconst backgroundColorClass = backgroundColor != undefined ? getColorClassName('background-color', backgroundColor) : '';\r\n\t\t\r\n\t\tconst hide = mediaControl ? '' : 'on-media-hide';\r\n\r\n\t\treturn (\r\n\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t\t\t{attributes.useMedia && attributes.mediaId != 0 \r\n\t\t\t\t\t\t? \r\n\t\t\t\t\t\t:

{attributes.mediaInput}

\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}","import { __ } from '@wordpress/i18n'\r\nimport { Fragment } from '@wordpress/element'\r\nimport { InspectorControls } from '@wordpress/block-editor'\r\nimport { RangeControl, PanelBody, __experimentalInputControl as InputControl } from '@wordpress/components'\r\n\r\nexport default function Edit ( props ) {\r\n\r\n const srcBase = 'https://www.google.com/maps/embed/v1/place?key=';\r\n\r\n const googleAPIKey = options.map_secret_key;\r\n\r\n const { attributes, setAttributes } = props;\r\n\r\n const { width, height, zoom, address, mediaControl } = attributes;\r\n \r\n const getaddress = Object.values(address).filter(line => line != '');\r\n \r\n const queryString = getaddress.reduce((acc, curr, i) => acc + ' ' + curr, '').trim().toLowerCase();\r\n\r\n const getSrc = `${srcBase + googleAPIKey}&q=${encodeURI(queryString)}&zoom=${zoom}`;\r\n\r\n setAttributes({ src: getSrc });\r\n\r\n const styles = {\r\n width: width + '%',\r\n paddingBottom: height + '%',\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n setAttributes({ width })}\r\n min={0}\r\n max={100}\r\n />\r\n setAttributes({ height })}\r\n min={0}\r\n max={100}\r\n />\r\n setAttributes({ zoom })}\r\n min={0}\r\n max={100}\r\n />\r\n \r\n\r\n \r\n \r\n setAttributes({ address: { ...address, street } })}\r\n />\r\n \r\n setAttributes({ address: { ...address, zip } })}\r\n />\r\n \r\n setAttributes({ address: { ...address, city } })}\r\n />\r\n \r\n setAttributes({ address: { ...address, country } })}\r\n />\r\n \r\n\r\n \r\n props.setAttributes({ mediaControl })}\r\n />\r\n \r\n \r\n\r\n
\r\n {\r\n googleAPIKey != ''\r\n ? \r\n
\r\n )\r\n }\r\n}","import { __ } from '@wordpress/i18n'\r\nimport { PanelBody, ToggleControl } from '@wordpress/components'\r\n\r\nexport function SmallScreenControl ( props ) {\r\n return (\r\n \r\n props.setAttributes({ mediaControl })}\r\n />\r\n \r\n );\r\n}","import { ButtonGroup, Button, Dashicon } from '@wordpress/components'\r\n\r\nexport const RadioGroup = ({ onClick, options, initialChecked, showIcons, label }) => (\r\n onClick(event)})}>\r\n {label &&

{label}

}\r\n {options.map((option, index) => onClick(event)})}\r\n className={initialChecked === option && 'is-primary'}\r\n key={index}\r\n checked={initialChecked}\r\n value={option}\r\n >{showIcons ? : option})}\r\n
\r\n);","export const attributes = (settings, name) => {\r\n\r\n if ( ! name.includes( 'noor' ) ) {\r\n \r\n Object.assign(settings.attributes, {\r\n mediaControl: {\r\n type: 'boolean',\r\n default: true\r\n }\r\n });\r\n }\r\n\r\n if ( 'core/button' === name ) {\r\n\r\n Object.assign(settings.attributes, {\r\n useIcon: {\r\n type: 'boolean',\r\n default: true\r\n },\r\n alignIcon: {\r\n type: 'boolean',\r\n default: false\r\n },\r\n icon: {\r\n type: 'string',\r\n default: 'arrow-right-alt'\r\n }\r\n });\r\n }\r\n\r\n if ( 'core/column' === name ) {\r\n\r\n Object.assign(settings.attributes, {\r\n backgroundColor: {\r\n type: 'string',\r\n }\r\n })\r\n }\r\n\r\n return settings;\r\n}","import { __ } from '@wordpress/i18n'\r\nimport { createHigherOrderComponent } from '@wordpress/compose'\r\nimport { Fragment } from '@wordpress/element'\r\nimport { withColors, InspectorControls, PanelColorSettings } from '@wordpress/block-editor'\r\nimport { compose } from '@wordpress/compose'\r\nimport { PanelBody, ToggleControl } from '@wordpress/components'\r\nimport { RadioGroup } from '../components/radio-group'\r\nimport { SmallScreenControl } from '../components/controls'\r\n\r\nconst iconControlOptions = [\r\n 'arrow-right-alt',\r\n 'arrow-left-alt',\r\n 'arrow-right-alt2',\r\n 'arrow-left-alt2',\r\n 'clock',\r\n 'location'\r\n];\r\n\r\nexport const blockEdit = compose(\r\n withColors({ backgroundColor: 'background-color' }),\r\n createHigherOrderComponent( BlockEdit => props => {\r\n\r\n if ( ! props.name.includes( 'noor' ) ) {\r\n \r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n if ( props.name === 'core/column' ) {\r\n\r\n const {backgroundColor, setBackgroundColor} = props;\r\n\r\n props.setAttributes({ className: backgroundColor.class != undefined ? backgroundColor.class + ' has-background' : '' });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n if ( props.name === 'core/button' ) {\r\n\r\n const {attributes, setAttributes} = props;\r\n\r\n const {useIcon, alignIcon, icon} = props.attributes;\r\n \r\n const setIconClassList = () => {\r\n\r\n const align = alignIcon ? 'has-left-icon' : 'has-right-icon';\r\n\r\n const iconName = useIcon && icon !== '' ? `has-icon-${icon}` : undefined;\r\n\r\n const className = align + ' ' + iconName;\r\n\r\n setAttributes({ className });\r\n }\r\n \r\n const setUseIcon = useIcon => {\r\n\r\n setAttributes({ useIcon });\r\n\r\n if ( ! useIcon ) {\r\n\r\n setIcon( '' );\r\n }\r\n }\r\n\r\n const setIcon = (value, event) => {\r\n\r\n if ( event ) {\r\n\r\n event.preventDefault();\r\n }\r\n\r\n setAttributes({ icon: value });\r\n\r\n setIconClassList();\r\n }\r\n\r\n setIcon( icon );\r\n \r\n return (\r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n setAttributes({ alignIcon: ! alignIcon })}\r\n />\r\n\r\n {useIcon && {\r\n event.preventDefault();\r\n setAttributes({ icon: event.currentTarget.value, event });\r\n }}\r\n options={iconControlOptions} \r\n initialChecked={props.attributes.icon} \r\n showIcons={true} \r\n />}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return \r\n}, 'blockEdit'));","export const extraProps = ( props, blockType, attributes ) => {\r\n\r\n if ( ! attributes.mediaControl && ! blockType.name.includes('noor') ) {\r\n\r\n props.className = props.className + ' on-media-hide';\r\n }\r\n\r\n return props;\r\n}","import { attributes } from './attributes'\r\n\r\nimport { blockEdit } from './blockEdit'\r\n\r\nimport { extraProps } from './extraProps'\r\n\r\nexport const filters = {\r\n attributes,\r\n blockEdit,\r\n extraProps\r\n}\r\n","import { registerBlockType } from '@wordpress/blocks'\r\n\r\nimport * as accordion from './blocks/accordion/index'\r\n\r\nimport * as bulletPoint from './blocks/bulletpoint/index'\r\n\r\nimport * as googleMap from './blocks/google-map/index'\r\n\r\nimport { addFilter } from '@wordpress/hooks'\r\n\r\nimport { filters } from './filters/index'\r\n\r\nconst prefix = 'noor/';\r\n\r\nconst registerBlock = block => {\r\n\r\n\tconst {name, settings} = block;\r\n\t\r\n\tregisterBlockType( prefix + name, settings );\r\n}\r\n\r\nconst registerNoorBlocks = () => [\r\n\taccordion,\r\n bulletPoint,\r\n googleMap\r\n].forEach( block => registerBlock( block ) );\r\n\r\naddFilter(\r\n 'blocks.registerBlockType',\r\n 'noor/gutenberg-blocks/custom-attributes',\r\n filters.attributes\r\n);\r\n\r\naddFilter( \r\n 'editor.BlockEdit', \r\n 'noor/gutenberg-blocks/custom-control', \r\n filters.blockEdit \r\n);\r\n\r\naddFilter(\r\n 'blocks.getSaveContent.extraProps',\r\n 'noor/gutenberg-blocks/extraProps',\r\n filters.extraProps\r\n);\r\n\r\nregisterNoorBlocks();","// extracted by mini-css-extract-plugin","(function() { module.exports = this[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = this[\"wp\"][\"blocks\"]; }());","(function() { module.exports = this[\"wp\"][\"components\"]; }());","(function() { module.exports = this[\"wp\"][\"compose\"]; }());","(function() { module.exports = this[\"wp\"][\"data\"]; }());","(function() { module.exports = this[\"wp\"][\"element\"]; }());","(function() { module.exports = this[\"wp\"][\"hooks\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());"],"sourceRoot":""} \ No newline at end of file diff --git a/build/style-index.css b/build/style-index.css index 1f03a99..26c8744 100644 --- a/build/style-index.css +++ b/build/style-index.css @@ -1,2 +1,193 @@ -.has-icon-arrow-right-alt .wp-block-button__link:after,.has-icon-arrow-right-alt .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt:hover .wp-block-button__link:after{right:-6px}.has-icon-arrow-right-alt2 .wp-block-button__link:after,.has-icon-arrow-right-alt2 .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt2:hover .wp-block-button__link:after{right:-6px}.has-icon-arrow-left-alt .wp-block-button__link:after,.has-icon-arrow-left-alt .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt:hover .wp-block-button__link:after{right:-6px}.has-icon-arrow-left-alt2 .wp-block-button__link:after,.has-icon-arrow-left-alt2 .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt2:hover .wp-block-button__link:after{right:-6px}.has-icon-clock .wp-block-button__link:after,.has-icon-clock .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-clock.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-clock.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-clock:hover .wp-block-button__link:after{right:-6px}.has-icon-location .wp-block-button__link:after,.has-icon-location .wp-block-button__link:before{display:none;font-family:dashicons;font-size:20px;vertical-align:middle}.has-icon-location.has-left-icon .wp-block-button__link:before{display:inline-block;content:"";padding-right:8px}.has-icon-location.has-right-icon .wp-block-button__link:after{position:relative;display:inline-block;content:"";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-location:hover .wp-block-button__link:after{right:-6px}.noor-block-bullet-point{display:flex;width:100%}.noor-block-bullet-point.has-align-center{justify-content:center}.noor-block-bullet-point.has-align-right{justify-content:flex-end}.noor-block-bullet-point.has-align-left{justify-content:flex-start}.noor-block-bullet-point__point{display:flex;flex-direction:column;justify-content:center;align-items:center;width:87px;height:87px;border-radius:50%;overflow:hidden}.noor-block-bullet-point__text-content{margin:0!important}.noor-block-google-map{position:relative;height:0;overflow:hidden}.noor-block-google-map iframe{position:absolute;top:0;left:0;width:100%!important;height:100%!important;border:0!important}.noor-block-accordion{display:flex;align-items:center;padding:0 2rem;margin:1rem auto 0!important}.noor-block-accordion__title{width:100%;margin:.5rem 0!important}.noor-block-accordion__icon[data-state=true]{display:block}.noor-block-accordion__icon[data-state=false]{display:none}.noor-block-accordion__content{height:0;padding:0 2rem;overflow:hidden}.noor-block-accordion[aria-expanded=true]+.noor-block-accordion__content{height:auto} -/*# sourceMappingURL=style-index.css.map */ \ No newline at end of file +@charset "UTF-8"; +.has-icon-arrow-right-alt .wp-block-button__link::before, +.has-icon-arrow-right-alt .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-right-alt:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-arrow-right-alt2 .wp-block-button__link::before, +.has-icon-arrow-right-alt2 .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-right-alt2:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-arrow-left-alt .wp-block-button__link::before, +.has-icon-arrow-left-alt .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-left-alt:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-arrow-left-alt2 .wp-block-button__link::before, +.has-icon-arrow-left-alt2 .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-arrow-left-alt2:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-clock .wp-block-button__link::before, +.has-icon-clock .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-clock.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-clock.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-clock:hover .wp-block-button__link::after { + right: -6px; } + +.has-icon-location .wp-block-button__link::before, +.has-icon-location .wp-block-button__link::after { + display: none; + font-family: 'dashicons'; + font-size: 20px; + vertical-align: middle; } + +.has-icon-location.has-left-icon .wp-block-button__link::before { + display: inline-block; + content: ""; + padding-right: 8px; } + +.has-icon-location.has-right-icon .wp-block-button__link::after { + position: relative; + display: inline-block; + content: ""; + right: 0; + padding-left: 8px; + transition: right .25s ease-in-out; } + +.has-icon-location:hover .wp-block-button__link::after { + right: -6px; } + +.noor-block-bullet-point { + display: flex; + width: 100%; } + .noor-block-bullet-point.has-align-center { + justify-content: center; } + .noor-block-bullet-point.has-align-right { + justify-content: flex-end; } + .noor-block-bullet-point.has-align-left { + justify-content: flex-start; } + .noor-block-bullet-point__point { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 87px; + height: 87px; + border-radius: 50%; + overflow: hidden; } + .noor-block-bullet-point__text-content { + margin: 0 !important; } + +.noor-block-google-map { + position: relative; + height: 0; + overflow: hidden; } + .noor-block-google-map iframe { + position: absolute; + top: 0; + left: 0; + width: 100% !important; + height: 100% !important; + border: 0 !important; } + +.noor-block-accordion { + display: flex; + align-items: center; + padding: 0 2rem; + margin: 1rem auto 0 !important; } + .noor-block-accordion__title { + width: 100%; + margin: 0.5rem 0 !important; } + .noor-block-accordion__icon[data-state="true"]  { + display: block; } + .noor-block-accordion__icon[data-state="false"] { + display: none; } + .noor-block-accordion__content { + height: 0; + padding: 0 2rem; + overflow: hidden; } + .noor-block-accordion[aria-expanded="true"] + .noor-block-accordion__content { + height: auto; } + + +/*# sourceMappingURL=style-index.css.map*/ \ No newline at end of file diff --git a/build/style-index.css.map b/build/style-index.css.map index fd58bf0..2be3952 100644 --- a/build/style-index.css.map +++ b/build/style-index.css.map @@ -1 +1 @@ -{"version":3,"sources":["css ./node_modules/css-loader/dist/cjs.js??ref--7-1!./node_modules/postcss-loader/src??postcss!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./src/styles/style.scss"],"names":[],"mappings":"AAAA,+GAAiH,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,sEAAuE,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,sEAAuE,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,6DAA8D,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C,YAAA,CAAa,qBAAA,CAAsB,sBAAA,CAAuB,kBAAA,CAAmB,UAAA,CAAW,WAAA,CAAY,iBAAA,CAAkB,eAAA,CAAgB,uCAAuC,kBAAA,CAAoB,uBAAuB,iBAAA,CAAkB,QAAA,CAAS,eAAA,CAAgB,8BAA8B,iBAAA,CAAkB,KAAA,CAAM,MAAA,CAAO,oBAAA,CAAsB,qBAAA,CAAuB,kBAAA,CAAoB,sBAAsB,YAAA,CAAa,kBAAA,CAAmB,cAAA,CAAe,4BAAA,CAA8B,6BAA6B,UAAA,CAAW,wBAAA,CAA2B,6CAAgD,aAAA,CAAc,8CAAgD,YAAA,CAAa,+BAA+B,QAAA,CAAS,cAAA,CAAe,eAAA,CAAgB,yEAA2E,WAAA","file":"style-index.css","sourcesContent":[".has-icon-arrow-right-alt .wp-block-button__link::before,.has-icon-arrow-right-alt .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt:hover .wp-block-button__link::after{right:-6px}.has-icon-arrow-right-alt2 .wp-block-button__link::before,.has-icon-arrow-right-alt2 .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-right-alt2:hover .wp-block-button__link::after{right:-6px}.has-icon-arrow-left-alt .wp-block-button__link::before,.has-icon-arrow-left-alt .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt:hover .wp-block-button__link::after{right:-6px}.has-icon-arrow-left-alt2 .wp-block-button__link::before,.has-icon-arrow-left-alt2 .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-arrow-left-alt2:hover .wp-block-button__link::after{right:-6px}.has-icon-clock .wp-block-button__link::before,.has-icon-clock .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-clock.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-clock.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-clock:hover .wp-block-button__link::after{right:-6px}.has-icon-location .wp-block-button__link::before,.has-icon-location .wp-block-button__link::after{display:none;font-family:'dashicons';font-size:20px;vertical-align:middle}.has-icon-location.has-left-icon .wp-block-button__link::before{display:inline-block;content:\"\";padding-right:8px}.has-icon-location.has-right-icon .wp-block-button__link::after{position:relative;display:inline-block;content:\"\";right:0;padding-left:8px;transition:right .25s ease-in-out}.has-icon-location:hover .wp-block-button__link::after{right:-6px}.noor-block-bullet-point{display:flex;width:100%}.noor-block-bullet-point.has-align-center{justify-content:center}.noor-block-bullet-point.has-align-right{justify-content:flex-end}.noor-block-bullet-point.has-align-left{justify-content:flex-start}.noor-block-bullet-point__point{display:flex;flex-direction:column;justify-content:center;align-items:center;width:87px;height:87px;border-radius:50%;overflow:hidden}.noor-block-bullet-point__text-content{margin:0 !important}.noor-block-google-map{position:relative;height:0;overflow:hidden}.noor-block-google-map iframe{position:absolute;top:0;left:0;width:100% !important;height:100% !important;border:0 !important}.noor-block-accordion{display:flex;align-items:center;padding:0 2rem;margin:1rem auto 0 !important}.noor-block-accordion__title{width:100%;margin:0.5rem 0 !important}.noor-block-accordion__icon[data-state=\"true\"] {display:block}.noor-block-accordion__icon[data-state=\"false\"]{display:none}.noor-block-accordion__content{height:0;padding:0 2rem;overflow:hidden}.noor-block-accordion[aria-expanded=\"true\"]+.noor-block-accordion__content{height:auto}\n"]} \ No newline at end of file +{"version":3,"sources":["webpack:///style.scss"],"names":[],"mappings":"AAAA,gBAAgB;AAChB;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;AAEtB;EACE,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,kCAAkC,EAAE;;AAEtC;EACE,WAAW,EAAE;;AAEf;;EAEE,aAAa;EACb,wBAAwB;EACxB,eAAe;EACf,sBAAsB,EAAE;;AAE1B;EACE,qBAAqB;EACrB,YAAY;EACZ,kBAAkB,EAAE;;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["@charset \"UTF-8\";\n.has-icon-arrow-right-alt .wp-block-button__link::before,\n.has-icon-arrow-right-alt .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-right-alt.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-right-alt.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-right-alt:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-arrow-right-alt2 .wp-block-button__link::before,\n.has-icon-arrow-right-alt2 .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-right-alt2.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-right-alt2.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-right-alt2:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-arrow-left-alt .wp-block-button__link::before,\n.has-icon-arrow-left-alt .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-left-alt.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-left-alt.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-left-alt:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-arrow-left-alt2 .wp-block-button__link::before,\n.has-icon-arrow-left-alt2 .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-arrow-left-alt2.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-arrow-left-alt2.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-arrow-left-alt2:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-clock .wp-block-button__link::before,\n.has-icon-clock .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-clock.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-clock.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-clock:hover .wp-block-button__link::after {\n right: -6px; }\n\n.has-icon-location .wp-block-button__link::before,\n.has-icon-location .wp-block-button__link::after {\n display: none;\n font-family: 'dashicons';\n font-size: 20px;\n vertical-align: middle; }\n\n.has-icon-location.has-left-icon .wp-block-button__link::before {\n display: inline-block;\n content: \"\";\n padding-right: 8px; }\n\n.has-icon-location.has-right-icon .wp-block-button__link::after {\n position: relative;\n display: inline-block;\n content: \"\";\n right: 0;\n padding-left: 8px;\n transition: right .25s ease-in-out; }\n\n.has-icon-location:hover .wp-block-button__link::after {\n right: -6px; }\n\n.noor-block-bullet-point {\n display: flex;\n width: 100%; }\n .noor-block-bullet-point.has-align-center {\n justify-content: center; }\n .noor-block-bullet-point.has-align-right {\n justify-content: flex-end; }\n .noor-block-bullet-point.has-align-left {\n justify-content: flex-start; }\n .noor-block-bullet-point__point {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 87px;\n height: 87px;\n border-radius: 50%;\n overflow: hidden; }\n .noor-block-bullet-point__text-content {\n margin: 0 !important; }\n\n.noor-block-google-map {\n position: relative;\n height: 0;\n overflow: hidden; }\n .noor-block-google-map iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100% !important;\n height: 100% !important;\n border: 0 !important; }\n\n.noor-block-accordion {\n display: flex;\n align-items: center;\n padding: 0 2rem;\n margin: 1rem auto 0 !important; }\n .noor-block-accordion__title {\n width: 100%;\n margin: 0.5rem 0 !important; }\n .noor-block-accordion__icon[data-state=\"true\"]  {\n display: block; }\n .noor-block-accordion__icon[data-state=\"false\"] {\n display: none; }\n .noor-block-accordion__content {\n height: 0;\n padding: 0 2rem;\n overflow: hidden; }\n .noor-block-accordion[aria-expanded=\"true\"] + .noor-block-accordion__content {\n height: auto; }\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/components/controls.js b/src/components/controls.js new file mode 100644 index 0000000..f700490 --- /dev/null +++ b/src/components/controls.js @@ -0,0 +1,17 @@ +import { __ } from '@wordpress/i18n' +import { PanelBody, ToggleControl } from '@wordpress/components' + +export function SmallScreenControl ( props ) { + return ( + + props.setAttributes({ mediaControl })} + /> + + ); +} \ No newline at end of file diff --git a/src/core-blocks/core-button.js b/src/core-blocks/core-button.js deleted file mode 100644 index dce0854..0000000 --- a/src/core-blocks/core-button.js +++ /dev/null @@ -1,123 +0,0 @@ -import { __ } from '@wordpress/i18n' -import { createHigherOrderComponent } from '@wordpress/compose' -import { Fragment } from '@wordpress/element' -import { InspectorControls } from '@wordpress/block-editor' -import { PanelBody, ToggleControl } from '@wordpress/components' -import { RadioGroup } from '../components/radio-group' - -const iconControlOptions = [ - 'arrow-right-alt', - 'arrow-left-alt', - 'arrow-right-alt2', - 'arrow-left-alt2', - 'clock', - 'location' -]; - -export const addInlineIconAttribute = ( settings, name ) => { - - if ( 'core/button' !== name ) { - - return settings; - } - - Object.assign(settings.attributes, { - useIcon: { - type: 'boolean', - default: true - }, - alignIcon: { - type: 'boolean', - default: false - }, - icon: { - type: 'string', - default: 'arrow-right-alt' - } - }); - - return settings; -}; - -export const withIcon = createHigherOrderComponent( BlockEdit => props => { - - if ( 'core/button' !== props.name ) { - - return ( ); - } - - const {attributes, setAttributes} = props; - - const {useIcon, alignIcon, icon} = props.attributes; - - const setIconClassList = () => { - - const align = alignIcon ? 'has-left-icon' : 'has-right-icon'; - - const iconName = useIcon && icon !== '' ? `has-icon-${icon}` : undefined; - - const className = align + ' ' + iconName; - - setAttributes({ className }); - } - - const setUseIcon = useIcon => { - - setAttributes({ useIcon }); - - if ( ! useIcon ) { - - setIcon( '' ); - } - } - - const setIcon = (value, event) => { - - if ( event ) { - - event.preventDefault(); - } - - setAttributes({ icon: value }); - - setIconClassList(); - } - - setIcon( icon ); - - return ( - - - - - - - - setAttributes({ alignIcon: ! alignIcon })} - /> - - {useIcon && { - event.preventDefault(); - setAttributes({ icon: event.currentTarget.value, event }); - }} - options={iconControlOptions} - initialChecked={props.attributes.icon} - showIcons={true} - />} - - - - ); -}, 'withIcon' ); diff --git a/src/core-blocks/core-column.js b/src/core-blocks/core-column.js deleted file mode 100644 index d69b60b..0000000 --- a/src/core-blocks/core-column.js +++ /dev/null @@ -1,54 +0,0 @@ -import { __ } from '@wordpress/i18n' -import { createHigherOrderComponent } from '@wordpress/compose' -import { Fragment } from '@wordpress/element' -import { withColors, InspectorControls, PanelColorSettings, getColorClassName } from '@wordpress/block-editor' -import { compose } from '@wordpress/compose' - -export const addBackgroundColor = (settings, name) => { - - if ( name != 'core/column' ) { - - return settings; - } - - Object.assign(settings.attributes, { - backgroundColor: { - type: 'string', - } - }) - - return settings; -} - -export const withBackgroundColor = compose( - withColors({ backgroundColor: 'background-color' }), - createHigherOrderComponent( BlockEdit => props => { - - if ( props.name != 'core/column' ) { - - return - } - - const {backgroundColor, setBackgroundColor} = props; - - props.setAttributes({ className: backgroundColor.class != undefined ? backgroundColor.class + ' has-background' : '' }); - - return ( - - - - - - - ); -}, 'withBackgroundColor')); diff --git a/src/filters/attributes.js b/src/filters/attributes.js new file mode 100644 index 0000000..e18fd73 --- /dev/null +++ b/src/filters/attributes.js @@ -0,0 +1,41 @@ +export const attributes = (settings, name) => { + + if ( ! name.includes( 'noor' ) ) { + + Object.assign(settings.attributes, { + mediaControl: { + type: 'boolean', + default: true + } + }); + } + + if ( 'core/button' === name ) { + + Object.assign(settings.attributes, { + useIcon: { + type: 'boolean', + default: true + }, + alignIcon: { + type: 'boolean', + default: false + }, + icon: { + type: 'string', + default: 'arrow-right-alt' + } + }); + } + + if ( 'core/column' === name ) { + + Object.assign(settings.attributes, { + backgroundColor: { + type: 'string', + } + }) + } + + return settings; +} \ No newline at end of file diff --git a/src/filters/blockEdit.js b/src/filters/blockEdit.js new file mode 100644 index 0000000..10040e8 --- /dev/null +++ b/src/filters/blockEdit.js @@ -0,0 +1,140 @@ +import { __ } from '@wordpress/i18n' +import { createHigherOrderComponent } from '@wordpress/compose' +import { Fragment } from '@wordpress/element' +import { withColors, InspectorControls, PanelColorSettings } from '@wordpress/block-editor' +import { compose } from '@wordpress/compose' +import { PanelBody, ToggleControl } from '@wordpress/components' +import { RadioGroup } from '../components/radio-group' +import { SmallScreenControl } from '../components/controls' + +const iconControlOptions = [ + 'arrow-right-alt', + 'arrow-left-alt', + 'arrow-right-alt2', + 'arrow-left-alt2', + 'clock', + 'location' +]; + +export const blockEdit = compose( + withColors({ backgroundColor: 'background-color' }), + createHigherOrderComponent( BlockEdit => props => { + + if ( ! props.name.includes( 'noor' ) ) { + + return ( + + + + + + + ) + } + + if ( props.name === 'core/column' ) { + + const {backgroundColor, setBackgroundColor} = props; + + props.setAttributes({ className: backgroundColor.class != undefined ? backgroundColor.class + ' has-background' : '' }); + + return ( + + + + + + + ); + } + + if ( props.name === 'core/button' ) { + + const {attributes, setAttributes} = props; + + const {useIcon, alignIcon, icon} = props.attributes; + + const setIconClassList = () => { + + const align = alignIcon ? 'has-left-icon' : 'has-right-icon'; + + const iconName = useIcon && icon !== '' ? `has-icon-${icon}` : undefined; + + const className = align + ' ' + iconName; + + setAttributes({ className }); + } + + const setUseIcon = useIcon => { + + setAttributes({ useIcon }); + + if ( ! useIcon ) { + + setIcon( '' ); + } + } + + const setIcon = (value, event) => { + + if ( event ) { + + event.preventDefault(); + } + + setAttributes({ icon: value }); + + setIconClassList(); + } + + setIcon( icon ); + + return ( + + + + + + + + setAttributes({ alignIcon: ! alignIcon })} + /> + + {useIcon && { + event.preventDefault(); + setAttributes({ icon: event.currentTarget.value, event }); + }} + options={iconControlOptions} + initialChecked={props.attributes.icon} + showIcons={true} + />} + + + + ); + } + + return +}, 'blockEdit')); \ No newline at end of file diff --git a/src/filters/extraProps.js b/src/filters/extraProps.js new file mode 100644 index 0000000..b6452eb --- /dev/null +++ b/src/filters/extraProps.js @@ -0,0 +1,9 @@ +export const extraProps = ( props, blockType, attributes ) => { + + if ( ! attributes.mediaControl && ! blockType.name.includes('noor') ) { + + props.className = props.className + ' on-media-hide'; + } + + return props; +} \ No newline at end of file diff --git a/src/filters/index.js b/src/filters/index.js new file mode 100644 index 0000000..30aad0f --- /dev/null +++ b/src/filters/index.js @@ -0,0 +1,11 @@ +import { attributes } from './attributes' + +import { blockEdit } from './blockEdit' + +import { extraProps } from './extraProps' + +export const filters = { + attributes, + blockEdit, + extraProps +} diff --git a/src/index.js b/src/index.js index a7f5f32..6e2f201 100644 --- a/src/index.js +++ b/src/index.js @@ -8,21 +8,7 @@ import * as googleMap from './blocks/google-map/index' import { addFilter } from '@wordpress/hooks' -import { __ } from '@wordpress/i18n' -import { createHigherOrderComponent } from '@wordpress/compose' -import { Fragment } from '@wordpress/element' -import { InspectorControls } from '@wordpress/block-editor' -import { PanelBody, ToggleControl } from '@wordpress/components' - -import { - addInlineIconAttribute, - withIcon -} from './core-blocks/core-button' - -import { - addBackgroundColor, - withBackgroundColor, -} from './core-blocks/core-column' +import { filters } from './filters/index' const prefix = 'noor/'; @@ -39,101 +25,22 @@ const registerNoorBlocks = () => [ googleMap ].forEach( block => registerBlock( block ) ); -registerNoorBlocks(); - -const mediaQueryControl = (settings, name) => { - - if ( ! name.includes( 'noor' ) ) { - - Object.assign(settings.attributes, { - mediaControl: { - type: 'boolean', - default: true - } - }); - } - - return settings; -} - -const mediaControl = createHigherOrderComponent( BlockEdit => props => { - - if ( ! props.name.includes( 'noor' ) ) { - - return ( - - - - - - props.setAttributes({ mediaControl })} - /> - - - - ); - } - - return -}, 'mediaControl'); - -const mediaExtraProps = ( props, blockType, attributes ) => { - - if ( ! attributes.mediaControl && ! blockType.name.includes('noor') ) { - - props.className = props.className + ' on-media-hide'; - } - - return props; -} - -// MEDIA DISPLAY SWITCH addFilter( 'blocks.registerBlockType', 'noor/gutenberg-blocks/custom-attributes', - mediaQueryControl + filters.attributes ); addFilter( 'editor.BlockEdit', 'noor/gutenberg-blocks/custom-control', - mediaControl + filters.blockEdit ); addFilter( 'blocks.getSaveContent.extraProps', 'noor/gutenberg-blocks/extraProps', - mediaExtraProps -); - -// CORE/BUTTON -addFilter( - 'blocks.registerBlockType', - 'noor/gutenberg-blocks/custom-attributes', - addInlineIconAttribute + filters.extraProps ); -addFilter( - 'editor.BlockEdit', - 'noor/gutenberg-blocks/custom-control', - withIcon -); - -// CORE/COLUMN -addFilter( - 'blocks.registerBlockType', - 'noor/gutenberg-blocks/custom-attributes', - addBackgroundColor -); - -addFilter( - 'editor.BlockEdit', - 'noor/gutenberg-blocks/custom-control', - withBackgroundColor -); \ No newline at end of file +registerNoorBlocks(); \ No newline at end of file