From 47910e5fe33d139098785175e64f959a38d91ab3 Mon Sep 17 00:00:00 2001 From: Chrillaz Date: Thu, 29 Oct 2020 16:55:03 +0100 Subject: [PATCH] improved on global show on mobile control --- 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 | 105 ++- src/filters/blockEdit.js | 141 +--- 11 files changed, 138 insertions(+), 2412 deletions(-) delete mode 100644 build/accordion.js.map delete mode 100644 build/index.js.map diff --git a/build/accordion.js b/build/accordion.js index 90308b5..d896294 100644 --- a/build/accordion.js +++ b/build/accordion.js @@ -1,290 +1 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = "./src/blocks/accordion/assets/accordion.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -function _arrayLikeToArray(arr, len) { - if (len == null || len > 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 +!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;\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 d602809..ebd1253 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' => '3b7bb90439c8aad98e7045809f3ab104'), 'accordion.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd70ba6744a311af1221964a05b6822fc')); \ 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' => '3e3431dedc31a36a978dcbe88a15441b'), 'accordion.js' => array('dependencies' => array('wp-polyfill'), 'version' => '787c70681cd515f09219444213a9f808')); \ No newline at end of file diff --git a/build/index.css b/build/index.css index f79ccfd..07fe663 100644 --- a/build/index.css +++ b/build/index.css @@ -1,190 +1,2 @@ -@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 +.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 diff --git a/build/index.css.map b/build/index.css.map index 9ee3c5d..345196f 100644 --- a/build/index.css.map +++ b/build/index.css.map @@ -1 +1 @@ -{"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 +{"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/editor.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,UAAA,CAAW,iHAAmH,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,uEAAwE,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,uEAAwE,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,8DAA+D,UAAA,CAAW,6GAA+G,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,qEAAsE,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,qEAAsE,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,4DAA6D,UAAA,CAAW,+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,UAAA,CAAW,2FAA6F,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,4DAA6D,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,4DAA6D,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,mDAAoD,UAAA,CAAW,iGAAmG,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,+DAAgE,oBAAA,CAAqB,WAAA,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 diff --git a/build/index.js b/build/index.js index 8372aa9..1d89b97 100644 --- a/build/index.js +++ b/build/index.js @@ -1,1617 +1 @@ -(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["style-index"],{ - -/***/ "./src/styles/style.scss": -/*!*******************************!*\ - !*** ./src/styles/style.scss ***! - \*******************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// extracted by mini-css-extract-plugin - -/***/ }) - -}]); - -/******/ (function(modules) { // webpackBootstrap -/******/ // install a JSONP callback for chunk loading -/******/ function webpackJsonpCallback(data) { -/******/ var chunkIds = data[0]; -/******/ var moreModules = data[1]; -/******/ var executeModules = data[2]; -/******/ -/******/ // add "moreModules" to the modules object, -/******/ // then flag all "chunkIds" as loaded and fire callback -/******/ var moduleId, chunkId, i = 0, resolves = []; -/******/ for(;i < chunkIds.length; i++) { -/******/ chunkId = chunkIds[i]; -/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { -/******/ resolves.push(installedChunks[chunkId][0]); -/******/ } -/******/ installedChunks[chunkId] = 0; -/******/ } -/******/ for(moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ modules[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(parentJsonpFunction) parentJsonpFunction(data); -/******/ -/******/ while(resolves.length) { -/******/ resolves.shift()(); -/******/ } -/******/ -/******/ // add entry modules from loaded chunk to deferred list -/******/ deferredModules.push.apply(deferredModules, executeModules || []); -/******/ -/******/ // run deferred modules when all chunks ready -/******/ return checkDeferredModules(); -/******/ }; -/******/ function checkDeferredModules() { -/******/ var result; -/******/ for(var i = 0; i < deferredModules.length; i++) { -/******/ var deferredModule = deferredModules[i]; -/******/ var fulfilled = true; -/******/ for(var j = 1; j < deferredModule.length; j++) { -/******/ var depId = deferredModule[j]; -/******/ if(installedChunks[depId] !== 0) fulfilled = false; -/******/ } -/******/ if(fulfilled) { -/******/ deferredModules.splice(i--, 1); -/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]); -/******/ } -/******/ } -/******/ -/******/ return result; -/******/ } -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // object to store loaded and loading chunks -/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched -/******/ // Promise = chunk loading, 0 = chunk loaded -/******/ var installedChunks = { -/******/ "index": 0 -/******/ }; -/******/ -/******/ var deferredModules = []; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; -/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); -/******/ jsonpArray.push = webpackJsonpCallback; -/******/ jsonpArray = jsonpArray.slice(); -/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); -/******/ var parentJsonpFunction = oldJsonpFunction; -/******/ -/******/ -/******/ // add entry module to deferred list -/******/ deferredModules.push([0,"style-index"]); -/******/ // run deferred modules when ready -/******/ return checkDeferredModules(); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! - \*****************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -function _arrayLikeToArray(arr, len) { - if (len == null || len > 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 +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{18:function(e,t,n){}}]),function(e){function t(t){for(var o,c,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;\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 26c8744..1f03a99 100644 --- a/build/style-index.css +++ b/build/style-index.css @@ -1,193 +1,2 @@ -@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 +.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 diff --git a/build/style-index.css.map b/build/style-index.css.map index 2be3952..fd58bf0 100644 --- a/build/style-index.css.map +++ b/build/style-index.css.map @@ -1 +1 @@ -{"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;;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,mBAAmB;EACnB,eAAe;EACf,8BAA8B,EAAE;EAChC;IACE,WAAW;IACX,2BAA2B,EAAE;EAC/B;IACE,cAAc,EAAE;EAClB;IACE,aAAa,EAAE;EACjB;IACE,SAAS;IACT,eAAe;IACf,gBAAgB,EAAE;EACpB;IACE,YAAY,EAAE","file":"style-index.css","sourcesContent":["@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 +{"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,UAAA,CAAW,iHAAmH,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,uEAAwE,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,uEAAwE,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,8DAA+D,UAAA,CAAW,6GAA+G,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,qEAAsE,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,qEAAsE,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,4DAA6D,UAAA,CAAW,+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,UAAA,CAAW,2FAA6F,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,4DAA6D,oBAAA,CAAqB,WAAA,CAAY,iBAAA,CAAkB,4DAA6D,iBAAA,CAAkB,oBAAA,CAAqB,WAAA,CAAY,OAAA,CAAQ,gBAAA,CAAiB,iCAAA,CAAkC,mDAAoD,UAAA,CAAW,iGAAmG,YAAA,CAAa,qBAAA,CAAwB,cAAA,CAAe,qBAAA,CAAsB,+DAAgE,oBAAA,CAAqB,WAAA,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,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 diff --git a/src/components/controls.js b/src/components/controls.js index f700490..15acd2b 100644 --- a/src/components/controls.js +++ b/src/components/controls.js @@ -1,17 +1,112 @@ import { __ } from '@wordpress/i18n' import { PanelBody, ToggleControl } from '@wordpress/components' +import { PanelColorSettings } from '@wordpress/block-editor' +import { RadioGroup } from '../components/radio-group' + +export const SmallScreenControl = ({ setAttributes, attributes: { mediaControl }}) => ( + + setAttributes({ mediaControl })} + /> + ); + +export const ColumnBackgrounControl = ({ backgroundColor, setBackgroundColor, setAttributes }) => { + + setAttributes({ className: backgroundColor.class != undefined ? backgroundColor.class + ' has-background' : '' }); + + return ( + + ); +} + +export const ButtonIconControl = ({ attributes: {useIcon, alignIcon, icon}, setAttributes }) => { + + const iconControlOptions = [ + 'arrow-right-alt', + 'arrow-left-alt', + 'arrow-right-alt2', + 'arrow-left-alt2', + 'clock', + 'location' + ]; + + const setIconClassList = () => { + + const align = alignIcon ? 'has-left-icon' : 'has-right-icon'; + + const iconName = useIcon && icon !== '' ? `has-icon-${icon}` : ''; + + 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 ); -export function SmallScreenControl ( props ) { return ( props.setAttributes({ mediaControl })} + label={__('Use inline icon')} + checked={useIcon} + onChange={setUseIcon} /> + + setAttributes({ alignIcon: ! alignIcon })} + /> + + {useIcon && { + event.preventDefault(); + setAttributes({ icon: event.currentTarget.value, event }); + }} + options={iconControlOptions} + initialChecked={icon} + showIcons={true} + />} ); } \ No newline at end of file diff --git a/src/filters/blockEdit.js b/src/filters/blockEdit.js index c4ba54f..a827d11 100644 --- a/src/filters/blockEdit.js +++ b/src/filters/blockEdit.js @@ -1,20 +1,14 @@ import { __ } from '@wordpress/i18n' import { createHigherOrderComponent } from '@wordpress/compose' import { Fragment } from '@wordpress/element' -import { withColors, InspectorControls, PanelColorSettings } from '@wordpress/block-editor' +import { withColors, InspectorControls } 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' -]; +import { + SmallScreenControl, + ColumnBackgrounControl, + ButtonIconControl +} from '../components/controls' export const blockEdit = compose( withColors({ backgroundColor: 'background-color' }), @@ -27,114 +21,37 @@ export const blockEdit = compose( + {props.name === 'core/column' && } + {props.name === 'core/button' && }
) } - if ( props.name === 'core/column' ) { + // if ( props.name === 'core/column' ) { - const {backgroundColor, setBackgroundColor} = props; + // return ( + // + // + // + // + // + // + // ); + // } - 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}` : ''; - - 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 ); + // if ( props.name === 'core/button' ) { - return ( - - - - - - - - setAttributes({ alignIcon: ! alignIcon })} - /> - - {useIcon && { - event.preventDefault(); - setAttributes({ icon: event.currentTarget.value, event }); - }} - options={iconControlOptions} - initialChecked={props.attributes.icon} - showIcons={true} - />} - - - - ); - } + // return ( + // + // + + // + // + // + // + // ); + // } return }, 'blockEdit')); \ No newline at end of file